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: Legacy DB with Multifield Dates
PostPosted: Mon May 10, 2010 2:11 pm 
Newbie

Joined: Mon May 10, 2010 1:41 pm
Posts: 15
I have a database whose dates and time are split across a number of fields. Such as:
CENTURY, YEAR, MONTH, DAY, HOUR, MIN, SECOND (Where all fields are 2 digit)

Being very new to hibernate I was wondering if anyone could suggest a nice way to deal with this. I am not concerned with performance at this time, just simplicity of implementation. What I thinking right now is something along the lines of Grouping (CENTURY, YEAR, MONTH, DAY) into a date, and (HOUR, MIN, SECOND) into a time along with the rest of the fields as an inner part of what would become a nested select where hibernate could stand on that as a starting point. The table will be used with criteria if that matters.

I'm just starting out here and don't yet know the tao of Hibernate... I do have the hibernate reference manual, and am thinking about getting "Java Persistence with Hibernate" as I really like "Struts 2 in action" by the same publisher.

So I would love the solution to come on a silver platter, who wouldn't but I would very much appreciate any sources that you've found helpful so I can skin my own cats, and/or a page reference to get me started in the Hibernate reference manual is just as good too.


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.