[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.rt.eclipselink] Re: interfaces
|
- From: aclipse@xxxxxxxx (Andreas Leue)
- Date: Tue, 14 Jul 2009 20:34:48 +0000 (UTC)
- Newsgroups: eclipse.rt.eclipselink
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
Dear James,
thank you for the clarification.
You can define a OneToOne relationship to an interface using the
@VariableOneToOne EclipseLink annotation.
Is there a notation to do this inside xml mappings?
There is currently no annotation for interface descriptors, but you
can define them using a SessionCustomizer and create a
RelationalDescriptor of interface type (setJavaInterface()).
I tried defining a mapping for an interface in xml, but get a null pointer
exception at
org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor
line 190:
EntityAccessor parentAccessor =
getProject().getEntityAccessor(parent.getName());
I guess that "parent" is null, since interfaces do not habe a superclass.
Is this supposed to work, or am I on the wrong track by trying this?
Besides - I'm just curious: am I the only one missing this feature in JPA?
To me it seems rather natural to map interfaces.
Andreas