Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Parent/Child BC4J Entity Object Sequence # Generation

4297Sep 5 2003 — edited Sep 9 2003
If anyone can help us in this we greatly appreciate it. We are using DBSequence data type to poplulate the parent entity with the sequence #; however, we need to populate the child entity with the same sequence #.

We have a DB Trigger for every insert of the parent's key and it's working great but what do we need to do for populating the child record.

Is there a way to get the sequence # as a part of the this code for the child entity object.

protected void create(AttributeList attributeList)
{
super.create(attributeList);

SequenceImpl mySeq = new SequenceImpl("MY_SEQ",getDBTransaction());
setMyObjectId(mySeq.getSequenceNumber());
}

Thank you,
Kamran
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 7 2003
Added on Sep 5 2003
10 comments
332 views