[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-572) @Node(name=, embedXml=true|false) for DOM4J
John Farrelly (JIRA)
noreply at atlassian.com
Wed Mar 19 12:11:33 EDT 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29839 ]
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list