parent « Column « JPA Q&A





1. Hibernate: specifying which column in parent entity should use    stackoverflow.com

I have the following entity in my HBM file:

<join table="v_price_change_current_prices" fetch="join" inverse="true">
    <key column="product_color_id" />
    <property name="oldMSRP" column="msrp" />
    <property name="oldList" ...

2. multiple parent reference columns    forum.hibernate.org

WHat 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.org

I 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.org

class 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")) }) ...