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!

save point and rollback programatically

user1688514Oct 17 2014 — edited Oct 17 2014

JDeveloper 11.1.2.4.0, Release 2

Hi,

Programmatically, inside the backing bean, I need to insert some records in two tables: parent and child.

In the parent, the primary key is generated through a sequence. So to insert records in the child, I first need the PK value in the parent so I have to commit the newly inserted record in the parent.

I couldn't find a way to set a save point before the insert starts, so that I can rollback whole transaction if for example my insert fails in the child.

Could you please give me an example on how to put a save point and a rollback to the save point in code?

Thank you

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 14 2014
Added on Oct 17 2014
2 comments
356 views