hibernate - How to map @Version with @JoinTable annotation -


i have 1 mapping table emp_add maintains mapping between employee , address tables. mapping use following mapping in employee class

@onetomany @jointable(name="emp_add", joincolumns={@joincolumn(name="emp_id")}, inversejoincolumns={@joincolumn(name="add_id")}) list<address> lstadd; 

and in address class

@manytoone(fetch=fetchtype.eager, cascade=cascadetype.refresh) @jointable(name="emp_add", joincolumns={@joincolumn(name="add_id")}, inversejoincolumns={@joincolumn(name="emp_id")}) employee objemp; 

now have created 1 more column in emp_add version_number use handle row version while updating record. can see there no pojo emp_add can't use @version annotation. can know how handle version in @jointable ?


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -