Currently using Spring JPA repository to save the data , but there is a table trigger after insert the record into the table, and i found that the spring JPA just move on after calling the repository save method without waiting for the trigger finish its job? Is there a way the spring JPA repository can wait till the Oracle table trigger finishes before completing? Thanks
-
By definition a trigger happens after the DML operation completes. The JPA operation does not know anything about the trigger in the DBasolanki– asolanki2021-02-04 04:37:03 +00:00Commented Feb 4, 2021 at 4:37
-
"a trigger happens after the DML operation completes" That depends on the trigger. So the solution might be to change the type of trigger, but if that is possible depends on the work done by the trigger.Jens Schauder– Jens Schauder2021-02-04 14:03:18 +00:00Commented Feb 4, 2021 at 14:03
-
This stackoverflow.com/questions/13012960/… even suggests the opposite.Jens Schauder– Jens Schauder2021-02-04 14:04:20 +00:00Commented Feb 4, 2021 at 14:04
-
I think we need more information about what work is done in the trigger and how you come to the conclusion, that JPA does does not wait for the trigger to finish.Jens Schauder– Jens Schauder2021-02-04 14:05:09 +00:00Commented Feb 4, 2021 at 14:05
Add a comment
|