Parent/Child BC4J Entity Object Sequence # Generation
4297Sep 5 2003 — edited Sep 9 2003If 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