If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

JPA Inheritance to use EAGER Loading when needed

I'm currently working on a backend and service for project as a student for a large company.

I use eclipseLink to provide JPA
a genericDAO to do the CRUDS
EJB to provide the service

I have the following problem. An employee has a personalhistory. Which is basicaly a collection of evalutions.

I try setting the mapping to lazy but then I get a Marshal exception: serialization mismatch uidís. Putting it to EAGER makes it work,but also because the data is realy big so it goes realy slow. Which is normal with EAGER loading.

I was thinking to perhaps try to implement one of the following:
- a possible fix for the previous stated problem and continue.
- use JPA inheritance to split person so I get a person without all the collections. and a personExtra that extends person. This provides me a person with all the collections.

Concerning the last option, is this possible? Is there any other good solution?