jsolari56 opened a new issue, #14565:
URL: https://github.com/apache/grails-core/issues/14565
This test also fails in master.
I created a PR for 6.0.x.BRINQA, but it might not be the best solution.
def "Test update newly created object"() {
setup:
def victor = new Pet(name: 'Victor')
def fritz = new Pet(name: 'Fritz')
def franz = new Pet(name: 'Franz')
def heinrich = new Pet(name: 'Heinrich')
victor.buddies = [fritz, franz]
when:
victor.save()
heinrich.save()
session.flush()
then:
victor.buddies.name.sort() == ['Franz', 'Fritz']
when: "Adding an element"
victor.buddies.add(heinrich)
def cousin = victor.cousin
then:
victor.buddies.name.sort() == ['Franz', 'Fritz', 'Heinrich']
when:
victor.markDirty("buddies")
victor.save()
session.flush()
victor.discard()
victor = Pet.findByName("Victor")
then:
victor.buddies.name.sort() == ['Franz', 'Fritz', 'Heinrich']
}
--
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]