|Persistence [message #842869]
||Thu, 12 April 2012 13:35
| Mitesh Pandey
Registered: March 2012
I have an entity like
public class Customer
private int customerID;
private int custID;
where customerID is a primary key column and hence it is annotated with Id
and custID is just another column
Requirement is that when customer object is persisted, customerID and custID should have the same value. Now, generation of ID is left to JPA.
How can i set CustID with the same value as CustomerID in a single database trip? Is there any annotation which can help me achieve it?
Powered by FUDForum
. Page generated in 0.09379 seconds