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

asked 01.12.2016 at 10:59

dolong's gravatar image

accept rate: 100%

edited 01.12.2016 at 11:06

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.


answered 05.12.2016 at 16:26

Flavio%20Sadeghi's gravatar image

Flavio Sadeghi ♦♦
accept rate: 75%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 01.12.2016 at 10:59

Seen: 1,436 times

Last updated: 05.12.2016 at 16:26