Please see this question on stackoverflow.com:
http://stackoverflow.com/questions/12373009/how-to-avoid-duplicate-keys-with-mysql-and-jpa
To summarize: is it possible to perform the following action atomically without the possibility of deadlock exceptions:
* Query for x (where x has a unique index)
* If x is not found, insert x
If so, how?
Thanks.
http://stackoverflow.com/questions/12373009/how-to-avoid-duplicate-keys-with-mysql-and-jpa
To summarize: is it possible to perform the following action atomically without the possibility of deadlock exceptions:
* Query for x (where x has a unique index)
* If x is not found, insert x
If so, how?
Thanks.