-->
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: help with mapping
PostPosted: Thu Jul 27, 2006 3:09 pm 
Newbie

Joined: Wed Jul 26, 2006 10:14 am
Posts: 4
i have a DB2 database with the following types in it

CHAR, SMALLINT, DATE, DEC(11,0)

what do i need to use in the mapping file for type="" and what java types should i use, right now i have most of the java variables as strings or calendar objects...

??????


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 27, 2006 6:24 pm 
Expert
Expert

Joined: Tue Dec 07, 2004 6:57 am
Posts: 285
Location: Nürnberg, Germany
I would use

String for CHAR
int for SMALLINT
java.util.Date from DATE
and BigDecimal for DEC


I'd have a try of not defining type in the mappings since hibernate is pretty good at guessing the right type.

I cant try it right here since I don't have DB2 on my Mac.

_________________
Please 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.  [ 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.