Hi all, An employee instance will be persisted (Persistent column is yes) in ivy process. Employee java class has a list of profiles but I want to persist the profiles' id instead of profiles and load profiles when call getProfiles() if profiles attribute is null. Do you have any solutions/suggestions? Thank you. Long Do |
If I understand the question correct, there exists a Table Employee and a Table Profiles. A Employee could have multiple Profiles and a Profile could be added to multiple Employees. So the relationship between Employee and Profile is Many-to-Many. Because of the limited configuration possibilities in the persistence dialog I would highly recommend to write plain Java Classes and annotate them with the corresponding JPA annotations. If you are not familiar with JPA I would highly recommend to read a book or some reliable online resources. JPA/Hibernate is a established library and widely used. But it has some pitfalls and if you don't know them they will come back and bite you. You have been warned. |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 01.12.2016 at 10:59
Seen: 2,443 times
Last updated: 05.12.2016 at 16:26