[
http://opensource.atlassian.com/projects/hibernate/browse/ANN-572?page=co...
]
John Farrelly commented on ANN-572:
-----------------------------------
When will this patch be available in hibernate-annotations?
I had to modify the patch to get my code to work. The setupNodeName() added to
AnnotationBinder.java is defined as follows in the patch:
private static void setupNodeName(PropertyBinder binder, PropertyData inferredData){
XProperty property = inferredData.getProperty();
Node nodeAnn = property.getAnnotation(Node.class);
if(nodeAnn != null)
binder.setNodeName(nodeAnn.value());
}
I had to change this method as below to allow for entities with no @Node annotation:
private static void setupNodeName(PropertyBinder binder, PropertyData inferredData){
XProperty property = inferredData.getProperty();
Node nodeAnn = property.getAnnotation(Node.class);
if(nodeAnn != null)
binder.setNodeName(nodeAnn.value());
else
binder.setNodeName(inferredData.getPropertyName());
}
@Node(name=, embedXml=true|false) for DOM4J
-------------------------------------------
Key: ANN-572
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-572
Project: Hibernate Annotations
Issue Type: Improvement
Components: binder
Reporter: Emmanuel Bernard
Attachments: hibernate-node-annotation.zip
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira