EntityManager doesn’t seem to care in which order to persist entities but I need that. Any ideas?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It would be expected for the EntityManager of the JPA implementation to have sufficient intelligence to work out in what order they are inserted in the datastore. At least that’s how we develop DataNucleus. The only thing the spec provides for you is that you are responsible for the calls to em.persist() and can do em.flush() where you want to force all to go to the datastore.
–Andy (DataNucleus)