armtuk: Cheetah (Default)
[personal profile] armtuk
I am struggling through Hibernate funness. I bought the O'Reilly book, but it's a bit thin, and after reading a few peoples' reviews, I also got the Persistence with Hibernate book from Manning which is AWESOME.

the merge method is evil. It looks like a good replacement for persist() but it isn't. merge() doesn't actually tie the object to the database state, so if you call merge() repeatedly on an object with no Id, it will save it repeatedly. persist() however does the right thing. The only thing merge gives you is the ability to save an object across sessions, but it would probably be better to attempt to re-attach the object instead of merging it.

Profile

armtuk: Cheetah (Default)
armtuk

April 2017

S M T W T F S
      1
2345678
9101112131415
16171819 202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 19th, 2025 11:16 pm
Powered by Dreamwidth Studios