Hi All.
I have a design problem and I am not aware how I can achieve this. I am using the Hibernate annotations support.
I have created one Secondary table and now I want to associate another table i.e. child to this secondary table only. My current configuration has made the association between the child table and the Primary table.
Please let me know how I can acheive my objective, if it is possible. My configuration is like this:
Secondary Table:
Code:
@Entity
@SecondaryTable(name = "secondary_table", pkJoinColumns = { @PrimaryKeyJoinColumn(name = "secid", referencedColumnName = "id") })
@DiscriminatorValue("contact")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
Child Table:
Code:
@Entity
@Table(name = "child_table")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
Best Regards,
Nitin