Skip to main content



      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 08:35 Go to next message
Eclipse UserFriend
hi..
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(
"metamodel_identifiable_id_attribute_type_incorrect",
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 11:13 Go to previous message
Eclipse UserFriend
Please log a bug and include your model and exception stack trace.
Previous Topic:getId of metaModel will NEVER work for embededID
Next Topic:Setting Cache expiry in persistance.xml
Goto Forum:
  


Current Time: Tue Jul 22 21:10:41 EDT 2025

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

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

Back to the top