-->
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.  [ 1 post ] 
Author Message
 Post subject: Question about parameter type assigning
PostPosted: Mon Feb 05, 2007 11:35 am 
Newbie

Joined: Thu Feb 01, 2007 4:12 pm
Posts: 2
Location: New Jersey
To all:
I have a question about assigning the Java types in hbm.xml file. Usually you assign a Java type that is equivalent to the data type in the database.
For example, a DATE field would be assigned a java.sql.Timestamp. And numeric data fields would be assigned "java.lang.Integer". Is it ok for me to override the type and just assign java.lang.String to all the data types in the hbm.xml file? The reason why I would do this is because my businees requirement requires me to show a hyphen string, "-", for any null data on my web page. If I need to do any calculations, I would convert the String variables to a numeric in my business layer.
If I do override the datatype, do I go against any rules within hibernate?

Thank you for any help you can give me.


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

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.