Home How to add data to database using Grails when there is oneTo many relationship?
 i tried to add data to my database using domain classes . i have oneToMany relationShip .. a cusomer could have one to many package. and a Package belongTo a customer . why i cant see any thing in DataBase with the flowing lines ?  Package p1 = new Package (packageId: '123456' , packetName: 'xx',packetVariant: 'pull').save() new Customer(clientId: '10100380', country: 'DK', name: 'Nybolig Ringsted', comment: '').addToPack(p1).save()