getId of metaModel will NEVER work for embededID [message #770829] |
Sun, 25 December 2011 08:35  |
Eclipse User |
|
|
|
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..
|
|
|
|
Powered by
FUDForum. Page generated in 0.06012 seconds