Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Support for inner classes?

There is support in EclipseLink for alternate ways of instantiating classes.

They require you to use some EclipseLink specific configuration (e.g. you will not be able to use pure JPA, for instance)


James Sutherland wrote:
EclipseLink can definitely map inner classes, but I am sure that there are
some types of inner classes that cannot be mapped.  EclipseLink does need
some way to instantiate an instance for a class, so if you class has no
default constructor there may be an issue.

Perhaps include an example of the exact type of inner class you want to
persist and someone can try it out.  Or try it yourself and see if you
encounter any issues.

Bugzilla from stephan@xxxxxxxxxxxxxxx wrote:

We are heavily using (non-static) inner classes and were quite
surprised to find that most persistence frameworks do _NOT_
support those, simply because non-static inner classes never have a default constructor with no arguments.

I would like to know if EclipseLink offers some means for
making instances of inner classes persistent. Is there API for
retrieving an object from persistent storage using a non-default

I have seen a couple of presentations on EclipseLink but have not yet taken a closer look, so a simple "No, its not supported" or "Yes, it can be done, but ..." would already help for our decission whether or not we should investigate EclipseLink in depth. Initial pointers where to look for such functionality
are of course appreciated.


--- James Sutherland
 EclipseLink ,
TopLink Wiki: EclipseLink , TopLink Forums: TopLink , EclipseLink Book: Java Persistence

Back to the top