Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Parent{
- static hasMany = [Childs:Child]
- }
- class Child {
- String name
- }
- def ParentInstance = Parent.get(1)
- ParentInstance.Childs.each {
- it.name = "titi"
- }
- ParentInstance .save()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement