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?

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:
> Hi,
> 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
> constructor?
> 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.
> thanks,
> Stephan

--- James Sutherland
 EclipseLink ,
Wiki: EclipseLink , TopLink 
Forums: TopLink , EclipseLink 
Book: Java Persistence 
View this message in context:
Sent from the EclipseLink - Users mailing list archive at

Back to the top