This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Grails: save() works, update and delete() do not work

 
Kai Wähner
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I have the following simple integration test:



Mitarbeiter is also simple:



The test passed without any errors. Saving some instances works, but I cannot update or delete them.

What's wrong with this code or what else could be the problem? (btw: I use the current Netbeans with Grails support as IDE).


Best regards, Kai
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try calling save(flush:true) instead of just save()
 
Kai Wähner
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although I am aware of the "flush"-concept in JPA, I did not find anything about it in my grails book and tutorials. Works now. Thank you...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic