Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Owner {
- List<Owned> owned
- static hasMany = [owned:Owned]
- }
- class Owned {
- Owner owner
- static belongsTo = [owner:Owner]
- }
- class Test {
- def runTest() {
- def owner = new Owner(owned: [new Owned()])
- assert null != owner.owned[0].owner
- }
- }
Add Comment
Please, Sign In to add comment