Ebean thinks it saves but it doesn't. Throws DuplicateKeyException but entity is not in Database
Ebean thinks it saves but it doesn't. Throws DuplicateKeyException but entity is not in Database
When Ebean tries to save an entity (let the entity is a child) which has links (fake ids) on another ones (its parents) that are not in the database PersistenceException naturally occurs.
Then I successfully save the referenced entities.
It's expected that the child would be saved, however Ebean throws DuplicateKeyExeption.
I tried to debug the source code and figured out that Ebean does something like cache and thinks that entity was saved... but it wasn't.
Maybe someone stumbled upon such mysterious problem... Thank you!
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.