Reputation: 12128
I dont know if this is possible but what I want to do is:
def par = Participant.get(0)
new Winner(par)
explaining the code above: Participant is parent class of Winner, so I wanna create a Winner instance but copying all the fields which are filled in that participant.
Is that possible?! thanks!
Upvotes: 0
Views: 159
Reputation: 3379
Maybe:
def par = Participant.get(0)
def winner = new Winner()
bindData(winner, par)
Upvotes: 2