ClassDescriptor.hasIdField() fails if id is declared in upper class
-------------------------------------------------------------------
Key: JCR-1537
URL: https://issues.apache.org/jira/browse/JCR-1537
Project: Jackrabbit
Issue Type: Bug
Components: jackrabbit-ocm
Affects Versions: 1.5
Environment: Mac OS X, JVM 1.5
Reporter: Stephane Landelle
org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor.hasIdField() looks up
only current class and not the whole hierarchy, so it fails when the id field
is declared in a upper class.
hasIdField should use getIdFieldDescriptor and not access idFieldDescriptor
field directly, as follows :
public boolean hasIdField() {
return (this.getIdFieldDescriptor() != null && this
.getIdFieldDescriptor().isId());
}
Please find patch enclosed.
Sincerely yours,
Stéphane Landelle
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.