1. Hibernate: specifying which column in parent entity |
2. multiple parent reference columns forum.hibernate.orgWHat is the best practice way to handle the following situation? I have an Address object with properties: Street City State In my model I have unrelated entity classes foo.Vendor, foo.Customer, foo.Client, foo.Warehouse all of which need a collection of address components. Is is better to have multiple address tables, i.e VendorAddress, CustomerAddress etc. or should I make one table with ... |
3. Using alternate column from parent class for many - many forum.hibernate.orgI have a table that has an OID, GROUP_ID and VERSION As versions are made to the field ticket the oid is incremented and the verison id is incremented. The group_id stays the same. A second object is related to the first object through the group_id foreign key. It has an OID, GROUP_ID, NAME, DESCRIPTION My question, and I have looked ... |
4. Why foreign key column is empty when I save parent with... forum.hibernate.orgclass Child { @Id @GeneratedValue @AttributeOverrides({ @AttributeOverride(name = "id", column = @Column(name = "id")) }) PrimaryKey key; @Column(name = "name) String name; ... @AttributeOverrides({ @AttributeOverride(name = "id", column = @Column(name = "parentId")) }) ... |