Hibernate version:3.2.4.sp1
Hibernate annotations version: 3.3.0.GA
Hi,
I'm building a unique layer for all our business applications. For performance issue I’m using foreign keys to tables where the corresponding class is not in my unique layer project.
--------------- CODE in my package ---------
@Entity
@Table…..
Public class person{
….
@ManyToOne(optional=false, fetch=FetchType.LAZY)
Private Bankaccount primaryBankAccount;
@ManyToOne(optional=false, fetch=FetchType.LAZY)
Private Bankaccount ensuranceBankAccount;
}
/**
* dummy interface
**/
Public interface Bankaccount{
}
------------- CODE outsite may unqiue layer project ------
@Entity
Public class Fortis implements Bankaccount{
private Person person;
....
}
@Entity
Public class ABNAnro implements Bankaccount{
private Person person;
...
}
Thank in advance,
Pieter
|