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 #435545] Thu, 11 June 2009 21:22 Go to next message
Spencer Uresk is currently offline Spencer UreskFriend
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.
Re: Validating inner classes marked with @Embeddable [message #435546 is a reply to message #435545] Fri, 12 June 2009 16:00 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 470
Registered: July 2009
Senior Member
This is indeed a bug, which has actually been addressed for our next
release - Dali 2.2 and part of WTP 3.1 (Galileo). This will be officially
released at the end of this month, but Release Candidate builds are
currently available.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=235428

Neil
Re: Validating inner classes marked with @Embeddable [message #435547 is a reply to message #435546] Fri, 12 June 2009 19:25 Go to previous message
Spencer Uresk is currently offline Spencer UreskFriend
Messages: 12
Registered: July 2009
Junior Member
Sorry, I somehow missed that bug report when I was looking earlier.

Thank you for the information.

- Spencer
Re: Validating inner classes marked with @Embeddable [message #616656 is a reply to message #435545] Fri, 12 June 2009 16:00 Go to previous message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 470
Registered: July 2009
Senior Member
This is indeed a bug, which has actually been addressed for our next
release - Dali 2.2 and part of WTP 3.1 (Galileo). This will be officially
released at the end of this month, but Release Candidate builds are
currently available.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=235428

Neil
Re: Validating inner classes marked with @Embeddable [message #616658 is a reply to message #435546] Fri, 12 June 2009 19:25 Go to previous message
Spencer Uresk is currently offline Spencer UreskFriend
Messages: 12
Registered: July 2009
Junior Member
Sorry, I somehow missed that bug report when I was looking earlier.

Thank you for the information.

- Spencer
Previous Topic:Validating inner classes marked with @Embeddable
Next Topic:Dali 2.2 (Galileo) is now available!
Goto Forum:
  


Current Time: Sun Dec 21 07:06:32 GMT 2014

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

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