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.  [ 4 posts ] 
Author Message
 Post subject: Formatted Output Result
PostPosted: Tue Aug 30, 2005 12:48 am 
Newbie

Joined: Tue Aug 30, 2005 12:30 am
Posts: 9
[b]Hibernate version:[/b] 3.0.5

[b]Name and version of the database you are using:[/b] sql server 2000

hi,

i have a problem for output result, my table data type is smalldatetime, it stores date and time, but i want to query output using hibernate but without time (time is 00 hour 00 minute 00 sec 00 ms).
any body have an idea for this problem ?

thank you


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 30, 2005 3:29 pm 
Senior
Senior

Joined: Tue Jan 11, 2005 5:03 pm
Posts: 137
Location: Montreal, Quebec
Probably a UserType solution would help you.

http://www.hibernate.org/hib_docs/api/net/sf/hibernate/UserType.html


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 31, 2005 12:12 am 
Newbie

Joined: Tue Aug 30, 2005 12:30 am
Posts: 9
I have to implements the UserType interface, do you have an example to help me?

thank you


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 31, 2005 3:21 pm 
Senior
Senior

Joined: Tue Jan 11, 2005 5:03 pm
Posts: 137
Location: Montreal, Quebec
There is many working example for Hibernate 2 and 3 there:

http://www.hibernate.org/37.html
check Interceptors, user types, and other extensions section


regards,

Etienne


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