Guillermo L
2013-03-21 13:04:11 UTC
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
--------------------------------------------------------------
Hi,
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:
<type-mapping>
   <sql-type jdbc-type="TIMESTAMP" hibernate-type="org.jadira.usertype.dateandtime.joda.PersistentDateTime">
</type-mapping>
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)
   @Type(type="org.jadira.usertype.dateandtime.joda.PersistentDateTime")
   private DateTime adate;
Hints are more than welcome :-)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/804052#804052]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]
"Jodatime and hibernate pojo generator"
To view the discussion, visit: https://community.jboss.org/message/804052#804052
--------------------------------------------------------------
Hi,
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:
<type-mapping>
   <sql-type jdbc-type="TIMESTAMP" hibernate-type="org.jadira.usertype.dateandtime.joda.PersistentDateTime">
</type-mapping>
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)
   @Type(type="org.jadira.usertype.dateandtime.joda.PersistentDateTime")
   private DateTime adate;
Hints are more than welcome :-)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/804052#804052]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]