[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.technology.dali] Validating inner classes marked with @Embeddable
|
- From: suresk@xxxxxxxxx (Spencer Uresk)
- Date: Thu, 11 Jun 2009 21:22:15 +0000 (UTC)
- Newsgroups: eclipse.technology.dali
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
I'm running into a minor issue with Dali's validation, and I'm wondering
if this is a bug that I need to file, or if it is just an unfortunate
disconnect between Dali and EclipseLink that I don't understand.
Bascially, I have a class that looks like this:
@Entity
public class A {
@EmbeddedId
private A.B pk;
@Embeddable
public static class PK {}
}
My mappings in my persistence.xml look like this:
<class>A</class>
<class>A$B</class>
EclipseLink is happy and everything works fine. However, I get 2
validation errors:
- Class "A" cannot be resolved (in persistence.xml)
- This mapped class is not specified in the persistence unit (in A.java)
Switching my second entry in persistence.xml to read:
<class>A.B</class>
makes Dali happy and causes both validations to go away, but then
EclipseLink fails when creating an EMF with the error
ClassNotFoundException: A.B. This makes sense since A.B is not a class,
but A$B is.
So, it looks as though Dali isn't validating inner classes properly.
Further, when I add a class via the "General" tab when editing
persistence.xml, it creates the entry with a dot instead of dollar sign. I
believe it also does it this way when you generate entities from your data
source.
It seems like this is a bug, but I am not 100% sure and wanted to get some
feedback before logging it as one. Does anyone have any thoughts on this?
Thanks.