This is my case:i use entity bean to handle table b,b is just for store historical data for table a.So b need a primary key(it's the same as a),but i always should use the same primary key value from table a when i move the record to b from a.when use hibernate,i can use assigned primary key for b,but in ejb3.0,there is no primary key type correspond to the "assigned" type in hibernate!
is it a fault of ejb3?or,how can i sovle my problem?
pay respects!!
Use the same sequence for both tables. And make sure that the beginning of the sequnce is bigger than max(a.pk) so they don't overlapp.
Regards
Felix