File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate/XDoclet changing name attribute to role

 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anyone ever come across an issue where XDoclet generates the Hibernate mapping of a "bag" and changes the attribute "name" to show up in the mapping file as "role" instead. For some reason, we have one class that this happens to, and therefore when you deploy it, it fails because the mandatory name attribute is not there.

Here is the method and XDoclet code for this List



Thanks

Mark
 
Sebastian Hennebrueder
Ranch Hand
Posts: 49
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Mark,

I have seen this one but I do not remember what we did. I am not a great fan of XDoclet even I have to use it for EJB 2. I prefer xml in java 1.4 and annotations in java 1.5 alias 5

Regards
Sebastian
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sebastian.

Here is what happened. The person that created this copied and pasted stuff form another module and didn't do it correctly. Such that it used the wrong Hibernate jar. It used the 2.1 jar and not the 3.0 jar. And the Maven Project.xml didn't have things correct either. So it used a different older version where the tag was supposed to be "role". We have now changed everything to be correct versions and such and it works.

Mark
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic