Hi,
I'm wondering if there is a possibilty to override a JoinTable definition comming from a @MappedSuperclass in a way such that I can use different JoinTables for all classes extending the MappedSuperclass (similar to AttributeOverride).
Example:
Code:
@MappedSuperclass
public class SomeSuperClass {
private List entries = new ArrayList();
@OneToMany(targetEntity=Entry.class, fetch=FetchType.LAZY)
@JoinTable(name="tblSuper2Entries", joinColumns={@JoinColumn(name="super_fk")}, inverseJoinColumns={@JoinColumn(name="entry_fk")})
public List getEntries() {
return this.entries;
}
}
Then in some extending classes I would like to use the OneToMany association comming from "SomeSuperClass" with the only difference that I want to use different join tables for each sub-class. Therefore I'm looking for some annotation that allows me to rename the table "tblSuper2Entries" to a name unique for each sub-class.
Is there a way to realise this?
Thanks,
john