Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hbm2java generates unexpected data type...

 
Tony Ennis
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

We're using hbm2java to fetch table DDL from a database and generate java pojos. Every table has a column called id. Every table has a column called lastUpdatedBy. In the database, they are identically defined columns (except id is a primary key.) However, the code being generated is the following:



Curiously, when I fetch data locally, everything works. But when I fetch data from my web service, I get a failure related to the "long" type on lastUpdatedBy. If I manually change the type to Long the webservice connection manager code doesn't choke on the table.

So 2 questions:

1. Why did hbm2java choose different types?
2. Why would my web service, which is running on my machine under jetspeed/tomcat/axis2 , have a problem with "long" when running the code directly doesn't? As far as I know, they are both using the same connection method and config files.

 
Tony Ennis
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind, adding a <column ... type="Long"> entity to the reveng.xml file did the trick.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic