Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Validating inner classes marked with @Embeddable
Validating inner classes marked with @Embeddable [message #616655] Thu, 11 June 2009 21:22
Spencer Uresk is currently offline Spencer Uresk
Messages: 12
Registered: July 2009
Junior Member
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.
Previous Topic:Extensibility of new entity gen wizard?
Next Topic:Validating inner classes marked with @Embeddable
Goto Forum:
  


Current Time: Thu Oct 23 18:10:52 GMT 2014

Powered by FUDForum. Page generated in 0.05878 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software