-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate mapping to primitives
PostPosted: Tue Aug 29, 2006 2:35 am 
Newbie

Joined: Tue Aug 29, 2006 2:30 am
Posts: 1
using hibernate 3.0.

Is it possible to map a bean with primitives directly to a table instead of using wrapper classes in the bean?

Problem comes when using hibernate to fetch data from a table. If this table happens to have null values in number columns then it is unable to set the null or blank value in the bean's primitive attribute.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 29, 2006 6:49 am 
Senior
Senior

Joined: Sat Nov 27, 2004 4:13 am
Posts: 137
Well it is obvious that primitives can not be NULL! So they can only be mapped to MANDATORY columns of database, otherwise errors will occur when fetching the entities.

_________________
don't forget to credit!

Amir Pashazadeh
Payeshgaran MT
پايشگران مديريت طرح
http://www.payeshgaran.co
http://www.payeshgaran.org
http://www.payeshgaran.net


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.