[jboss-user] [JBoss Tools] - Jodatime and hibernate pojo generator

Guillermo L do-not-reply at jboss.com
Thu Mar 21 09:04:11 EDT 2013

Guillermo L [https://community.jboss.org/people/gmlopezdev] created the discussion

"Jodatime and hibernate pojo generator"

To view the discussion, visit: https://community.jboss.org/message/804052#804052

I want to use jodatime for date types and hibernate tools to get the generated pojos from database. 

I'm using jadira in order to make this possible, however even when I map the type as the following I do not get the expected @Type annotation as I guess it should be.

My hibernate reveng file is as the following:

    <sql-type jdbc-type="TIMESTAMP" hibernate-type="org.jadira.usertype.dateandtime.joda.PersistentDateTime">

and here's the produced code:

    @Column(name = "adate", length = 23)
    private DateTime adate;

As per what I read about using jadira with hibernate I was expecting to get something like the following:

    @Column(name = "adate", length = 23)
    private DateTime adate;

Hints are more than welcome :-)

Reply to this message by going to Community

Start a new discussion in JBoss Tools at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130321/4f8262a1/attachment.html 

More information about the jboss-user mailing list