Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Erroneously duplicated @DiscriminatorValue - don't try this at home(A cautionary tale)
Erroneously duplicated @DiscriminatorValue - don't try this at home [message #773068] Sat, 31 December 2011 11:23 Go to next message
Brendan Healey is currently offline Brendan HealeyFriend
Messages: 12
Registered: May 2010
Junior Member

So, I accidentally used the same @DiscriminatorValue for two subclasses in the
same persistence hierarchy. My mistake, no doubt about it, but I can't help but
wonder if it could have been easier to diagnose. Firstly no guidance from my
IDE (NB7). Secondly no error messages in the server log. Thirdly
Query.getResultList was sporadically returning null values in mapped fields when
they weren't null and hanging the deployment to the app server
(eclipselink.ddl-generation=create-tables).

Due to my inability to spot the silly mistake some of the steps I took to
rectify the problem:

- re-installing glassfish from scratch
- re-installing NetBeans from scratch
- discarding a days work and restoring the project from backup

This problem manifests itself in a "everything's gone horribly wrong" kind of
way, so it would be great if some consistency checking could be performed by
the implementation.

I'm using EclipseLink 2.3.0.v20110604-r9504.

Regards,
Brendan.
Re: Erroneously duplicated @DiscriminatorValue - don't try this at home [message #777505 is a reply to message #773068] Tue, 10 January 2012 16:00 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Please log a bug to have an error thrown or warning logged if this incorrect configuration is detected.
--
James : http://wiki.eclipse.org/EclipseLink : http://en.wikibooks.org/wiki/Java_Persistence : http://java-persistence-performance.blogspot.com/


James : Wiki : Book : Blog : Twitter
Previous Topic:Order by primary key as a associated entity.
Next Topic:Erroneously duplicated @DiscriminatorValue - don't try this at home
Goto Forum:
  


Current Time: Tue Apr 23 17:49:32 GMT 2024

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

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

Back to the top