Monday, November 1, 2010

Avoiding JBO-26048 during commit in a master detail transaction

Hi,

You might face error JBO-26048 while performing COMMIT in a master detail transactions. This error occurs because by default your Association is not configured to perform optimized DMLs (Both Master and Detail same time) and you might see something similar.


(oracle.jbo.DMLConstraintException) JBO-26048:
Constraint "TAB_DET_TAB_MST_FK" is violated during post
operation "Insert" using SQL statement
"BEGIN INSERT INTO TAB_DET(DET_ID_SEQ,ID_SEQ,
DET_DESC,DELETE_FLAG) VALUES (:1,:2,:3,:4)
RETURNING DET_ID_SEQ INTO :5; END;".


You can simply avoid this checking the "Cascade update key attributes" and Composition Association in Association > Relationship



Happy JDeveloping,
Zeeshan Baig

1 comment:

  1. Thanks Zeeshan,
    Simple but effective solution :) ... Though, it's strange it didn't complain until I added a AltKey to my master EO :)

    ReplyDelete