Say we have 3 tables, 'Employee' with 'empid' as PK, 'Address' with 'addressid' as PK and 'empref' as FK 'Phone' with 'phoneid' as PK and 'empref' as FK Also, 'Employee' has unidirectional One-to-Many association with 'Address' and 'Phone'.
I am looking for a JPA compliant customized id generation strategy where the insertion of Employee should generate a unique-not-null value as 'empid' and set the same under 'empref' of both Phone and Address tables. (we are using JPA(hibernate-jpa-2.0-api-1.0.1.Final.jar) with hibernate version 3.6.10.Final)
Can someone help me out on this...
Thanks Vasu
|