Tag Archive for "hibernate" tag

SaveOrUpdate versus Merge in Hibernate

December 7th, 2008 by stevi | 23 comments

We all have those problems that we encounter just infrequently enough that when we see them again, we know we’ve solved this, but can’t remember how.
The NonUniqueObjectException thrown when using Session.saveOrUpdate() in Hibernate is one of mine. I’ll be adding new functionality to a complex application. All my unit tests work fine. Then in testing [...]

Annotation Mapping for Ordered Lists in Hibernate

October 20th, 2008 by stevi | 5 comments

Here’s another problem that has a simple solution that took me longer than I expected to find.
I am using Hibernate 3.2.5 as my ORM. In one case, I want to map a child collection of items as an ordered List, taking advantage of the database to do my ordering.
I’m using Annotations intead of the [...]