-->
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.  [ 3 posts ] 
Author Message
 Post subject: Optional mapping?
PostPosted: Sat Aug 21, 2004 10:13 am 
Beginner
Beginner

Joined: Fri Jan 16, 2004 11:05 am
Posts: 33
Hibernate version:
2.1.2


Oracle 8.1.5 does not provide a means to store and retrieve timestamps that have precision to microseconds. To solve this problem we have added micros columns to store this data. In DB2 and Oracle 9 and 10, the precision is there and the extra columns have been removed.

I can not change the tables to add or remove these columns, but I would like to have one code set that can access either databases. In our C++ code we handle these differences at the db layer. Any suggestions on how to do this with Hibernate?

Just to clarify this code is written to access tables that are primarly used by a C++ application.


Thanks for any information.

Travis Zimmerman


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 21, 2004 10:14 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Write a Type (NOT a UserType), that implements VersionType.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 21, 2004 10:27 am 
Beginner
Beginner

Joined: Fri Jan 16, 2004 11:05 am
Posts: 33
I stepped through the TimestampType. At the point that get() is called the ResultSet is already created and did not contain the Micros column in the statement, so it would not be available to retrieve data from.

I am comming at this as having a micr column is the exception not the rule. I have getters and setters for these columns but they are not in the mapping file.

Am I missing something here?


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