This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Salil Vverma wrote:Where are you trying to save the object ? In file, in database or at some location in network?
if you are saving the object in database. are you using any ORM tool like Hibernate or using JDBC ?
I wanted to save in database..groovy/grails frame work uses GORM(Hibernate), now im able to save mutilple objects which i am sending through gsp
below how i tried
company and person have one to many relationship
def cname = params.cname
def companyInstance = new Comapany(name:cname)
def name = params.name
def age = params.age
def personInstance = new Person(name:name,age:age)