-->
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: Primitive UserTYpe
PostPosted: Fri Jun 18, 2004 7:46 pm 
Newbie

Joined: Fri May 14, 2004 5:38 pm
Posts: 12
Hi,

I have a lame problem in that I have a legacy database with nullable numeric fields. For other reasons, I also have POJOs with regular primitive int properties that I dont want to convert to Integer. After reading the forums about this issue, it seems that I need to create a class that implments UserType to map nulls to 0. Is it possible to use the UserType to remap primitives? Does gets passed into deepCopy(Object o) for example.. I'm asuming it's Integer?

Is this the property way to do it?

Thanks!

joe


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 19, 2004 1:38 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Yes - Implement you own UserType.


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.