-->
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: Two Generators?
PostPosted: Tue Aug 23, 2005 9:03 am 
Beginner
Beginner

Joined: Thu Aug 18, 2005 4:34 pm
Posts: 33
I've got a table which has an ID column which is generated with "increment". (native doesn't work)

This table also has a boardroomID column. This ID represents a boardroom. The thing is, there can be duplicate boardroomID's. If a modification is made to a boardroom, a new row is added (new ID), but with the same boardroomID so we know it's the same one, and can sort by the time stamps.

So basically when I create a new one, it should have either a new boardroom ID, or it can be set to an existing one.

How can I do this with Hibernate? Is it bad practice to use my datasource directly? I could just copy the method from my old POJO's which had the persistance written by me in straight SQL....

Thanks,
Greg


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.