Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » getId of metaModel will NEVER work for embededID
getId of metaModel will NEVER work for embededID [message #770829] Sun, 25 December 2011 13:35 Go to next message
elhanan Maayan is currently offline elhanan MaayanFriend
Messages: 131
Registered: November 2009
Senior Member
i tried posting this in bugzilla but something is wrong anyway here's the code in getId of IdentifybleTypeImpl:

for(SingularAttribute<? super X, ?> anAttribute : idAttributes) {
// Verify type is correct - relax restriction on null and Object.class (from same classLoader)
if(null == type || Object.class == type ||
((type != null) && (type.getCanonicalName().equals(anAttribute.getJavaType().getCanonicalName())))) {
idAttribute = (SingularAttribute<? super X, Y>) anAttribute;
} else {
throw new IllegalArgumentException(ExceptionLocalization.buildMessage(
new Object[] { anAttribute, this, type, anAttribute.getJavaType() }));

problem is that in case of embdebleid this will ALWAYS fall on IAE cause no matter what, the set if idAttributes is different.

so either type is equal to the first or second, but if it equels to the first then the second comparison (or the one after that) will break it..
Re: getId of metaModel will NEVER work for embededID [message #777517 is a reply to message #770829] Tue, 10 January 2012 16:13 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 and include your model and exception stack trace.

James : Wiki : Book : Blog : Twitter
Previous Topic:getId of metaModel will NEVER work for embededID
Next Topic:Setting Cache expiry in persistance.xml
Goto Forum:

Current Time: Sun Sep 20 02:19:12 GMT 2020

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

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

Back to the top