0

Using Spring data is it possible to run 2 queries at the same time?

I ask as I have 2 query methods that I am calling to delete from the DB.

However I cannot run one before the other because it gives me the "ORA-02292 integrity constraint child record found" error.

Does the @Async annotation do what I am asking? If so, how do I use it?

java123999
  • 6,974
  • 36
  • 77
  • 121

1 Answers1

0

As your description, you don't need run 2 queries at the same time. So:

  • Create 2 queries with 2 different methods and call them in order you want.
  • Use "cascade delete"
  • Le Quang Nhan
    • 165
    • 1
    • 3
    • 13