-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: reverse engineer primitive vs. object
PostPosted: Fri Jan 06, 2006 11:19 am 
Beginner
Beginner

Joined: Thu Dec 11, 2003 12:02 pm
Posts: 23
When i reverse engineer, my db table columns of type float are reversed engineered to pojo with type java.lang.float as opposed to the object java.lang.Float. Is there anyway to reverse engineer to the object Float?

The primitive has assignment troubles when the column is null in the table row.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 06, 2006 11:24 am 
Beginner
Beginner

Joined: Thu Dec 11, 2003 12:02 pm
Posts: 23
Code:
<hibernate-reverse-engineering>
<type-mapping>
   <sql-type jdbc-type="FLOAT" hibernate-type="Float" precision="12" />
</type-mapping>

</hibernate-reverse-engineering>


Will cause the reverse engineer strategy to use objects instead of primitives or native types.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 06, 2006 11:31 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes, use java.lang.Float if you want java.lang.Float and use flot if you want float.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.