save « POJO « JPA Q&A





1. Hibernate many-to-many mapping not saved in pivot table    stackoverflow.com

I having problems saving many to many relationships to a pivot table. The way the pojos are created is unfortunately a pretty long process which spans over a couple of different threads ...

3. Discriminator value not updated in pojo after save    forum.hibernate.org

Hi, I upgraded my project from Hibernate 3.1 to 3.3.2 ga final. After this when I save a pojo object. The primary key value gets updated. However the discriminator value was not updated. It still remained as null. This was not the case with Hibernate 3.1. When I give session.refresh(obj), the discriminator value gets updated. I am using table per class ...

4. When is it save to get collection from pojo?    forum.hibernate.org

I have found that if create the Parent object, save it, and call "getChildren()" the object returned is null. However, if I close the session, and open a new session, then getChildren() returns an empty collection. I am wondering if the session rememberers that the parent has no children, so it returns null. When I close the session, it does not ...

5. Saving a HashMap field of a pojo    forum.hibernate.org

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [C:\Users\tag\workspace\xyz\conf\applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.PropertyNotFoundException: Could not find a setter for property bytes in class java.lang.String Caused by: org.hibernate.PropertyNotFoundException: Could not find a setter for property bytes in class java.lang.String at org.hibernate.property.BasicPropertyAccessor.createSetter(BasicPropertyAccessor.java:216) at org.hibernate.property.BasicPropertyAccessor.getSetter(BasicPropertyAccessor.java:209) at ...