Hello all,
I've been working with a testing environment where the entire schema is created upon startup, and then we benchmark how long it takes to persist a few instances of our data model in parallel. The issue is that there's some more generalized "static" data that is used in all of the data model instances. When persisting in parallel, we don't have instances of the static data in the database, and therefore it needs to be persisted as well. When running it in parallel though, it frequently tries to insert the static data multiple times.
It then throws
Code:
org.hibernate.exception.ConstraintViolationException: could not Insert . . .
I can solve this problem with synchronization of course, but I first wanted to check if there's anything in Hibernate that would solve this issue (and maybe faster than basic synchronization). I've been told this issue affects some scenarios outside of this testbed as well.
Thanks in advance!
Rob