Insert « Association « JPA Q&A





1. No inserts into my association table with annotations    forum.hibernate.org

I have a ShoppingCart object that maps to SHOPPING_CART table (primary key SHOPPING_CART_ID) I have a Purchase object that maps to PURCHASE table (primary key PURCHASE_ID) I have a table called SHOPPING_CART_PURCHASES (columns SHOPPING_CART_ID and PURCHASE_ID - both columns make a unique key) which is meant to house the associations between shopping carts and purchases. My ShoppingCart object has a list ...

2. hibernate inserts null for many-to-one association    forum.hibernate.org

Hi, I've got a class Actor and a class File. Each file is opened by one Actor, while an Actor can open multiple Files. Here are parts of the mapping files for both classes: Code: ...

3. Error inserting into one-to-many associations    forum.hibernate.org

Hibernate version:2.1 Problem scenario: We have a Parent object which has a one-to-many relation with the Child object. In the Parent.hbm.xml file we mentioned that one-to-many relation with the Child object. Child object has a Parent_ID parameter which maps to Parent's _Id. And in the Child table Parent_ID column is NOT NULL type. In the Java Bean of Parent.java we have ...

4. Inserting Null Value many-to-one association    forum.hibernate.org

Beginner Joined: Tue May 31, 2005 1:16 pm Posts: 35 Location: Bogota, Colombia The sql query is inserting null in field "csoc_codigolinea", which is a required field. I have completely populated the object I want to save!. Hibernate version: Hibernate 2.1.8 Mapping documents: