Relative Content

Tag Archive for hibernate

A bidirectional one-to-one association on a foreign key is common with many-to-one issue

[tag:`XML Approach <class name=”Campaign”> <id name=”id” column=”cmp_num”> </id> <one-to-one name=”person” property-ref=”address” cascade=”all”/> </class> <class name=”MopChangeDocData”> <id name=”id” column=”mop_cd_data_id”> </id> <many-to-one name=”campaign” column=”cmp_id” unique=”true”/> </class> Table mop_change_doc_data With the xml approach application works fine and generates the expected data but with the annotation approach it does not fetching the data. Annotation Classes @Entity @Table(name=”parent_cmp”) public class […]