• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Hibernate/XDoclet changing name attribute to role

 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic