Noirtam opened a new issue, #15224:
URL: https://github.com/apache/grails-core/issues/15224

   ### Expected Behavior
   
   Since migration 6 (maybe 7.0.0-RC1) to 7.0.0, I have error hibernate when 
I'm trying save two domains in the same transaction :
   ```groovy
   Utilisateur.withNewTransaction {
               //Creation utilisateur admin
               if (Utilisateur.countByUsername("test") == 0) {
                   Role roleAdmin = Role.findByAuthority("ROLE_ADMIN")
                   Utilisateur userAdmin = new Utilisateur(username: "test", 
password: "test", email: "[email protected]").save(flush: true, failOnError: true)
                   new UtilisateurRole(utilisateur: userAdmin, role: 
roleAdmin).save(flush: true, failOnError: true)
               }
           }
   ```
   
   Error : 
   ```
   
   org.springframework.orm.hibernate5.HibernateObjectRetrievalFailureException: 
No row with the given identifier exists: [org.monprojet.Utilisateur#13]
           at 
org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:238)
   ```
   
   ### Actual Behaviour
   
   _No response_
   
   ### Steps To Reproduce
   
   _No response_
   
   ### Environment Information
   
   _No response_
   
   ### Example Application
   
   _No response_
   
   ### Version
   
   7.0.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to