|
thanks for reading i just create a new instance and i want to retrieve the id created for this new instance. is there any way to perform this action?
|
|
By default, the id is assigned after the object is saved; until then, it's just null.
On Apr 23, 2012, at 7:51 PM, chichibek bros wrote: > thanks for reading > > i just create a new instance and i want to retrieve the id created for this new instance. is there any way to perform this action? --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
is already saved this is the example def userInstance = new User(params) userInsatnce.save(flus:true)
i need to perfom this operation a send userInstance id to email controller i try this but it doesnt work
redirect(controller:"email",params:[id:userInstance])
2012/4/23 Andy Sinesio <[hidden email]> By default, the id is assigned after the object is saved; until then, it's just null. |
|
You're missing the id property:
redirect(controller:"email",params:[id:userInstance.id]) On Apr 23, 2012, at 8:00 PM, chichibek bros wrote:
|
|
i tried and its work just great. thanks. great group
2012/4/23 Andy Sinesio <[hidden email]>
|
| Powered by Nabble | Edit this page |
