-->
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.  [ 6 posts ] 
Author Message
 Post subject: Composite Id + Custom Type + Triggered Value (Oracle)
PostPosted: Wed Jun 15, 2005 8:08 am 
Newbie

Joined: Wed Jun 15, 2005 8:00 am
Posts: 16
Location: Munich, Germany
I'm evaluating the use of hibernate on top our (ugly) legacy DB.

It's Oracle 9i with lots of tables having 2-column primary keys with one of them increased by a trigger.

Plus we use custom types to avoid errors with semantically close but different numerical values with inconsistent(sometimes overlapping) naming.

I know http://www.hibernate.org/hib_docs/v3/re ... -id-select but don't have a clue how to combine and get working

1) id + custom type
2) composite id + trigger
3) composite id + custom type + trigger

Any hint is appreciated!

Greetings,
M


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 15, 2005 11:54 am 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
Try evict and read after commit

regards


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 16, 2005 10:21 am 
Newbie

Joined: Wed Jun 15, 2005 8:00 am
Posts: 16
Location: Munich, Germany
How would I?

Let's say we have a property orderId, column DB_OrderId, sequence SEQ_OrderId of the custom type OrderId with mediator OrderIdMed.

How should I write the mapping?

Can you give me an example?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 16, 2005 11:46 am 
Newbie

Joined: Wed Jun 15, 2005 8:00 am
Posts: 16
Location: Munich, Germany
The single-column PK I tackled with the friendly help of http://forum.hibernate.org/viewtopic.php?t=929341


Top
 Profile  
 
 Post subject: composite id + trigger
PostPosted: Thu Feb 23, 2006 1:28 pm 
Newbie

Joined: Thu Feb 23, 2006 1:23 pm
Posts: 8
Hi mrohrmoser,

I'm facing the same situation as you did last summer. Have you found how you can mix composite id + trigger ? How ?

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 7:29 am 
Newbie

Joined: Wed Jun 15, 2005 8:00 am
Posts: 16
Location: Munich, Germany
Not really.
Try to either:
    * use an alternate candidate key to identify the row
    * duplicate the trigger logic into a DAO
    * refactor the ER model


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