Quantcast

how to get the id from recent create instance

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

how to get the id from recent create instance

chichibek bros
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?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: how to get the id from recent create instance

asinesio
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


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: how to get the id from recent create instance

chichibek bros
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.

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



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: how to get the id from recent create instance

asinesio
You're missing the id property:

redirect(controller:"email",params:[id:userInstance.id])

On Apr 23, 2012, at 8:00 PM, chichibek bros wrote:

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.

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




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: how to get the id from recent create instance

chichibek bros
i tried and its work just great. thanks. great group

2012/4/23 Andy Sinesio <[hidden email]>
You're missing the id property:

redirect(controller:"email",params:[id:userInstance.id])

On Apr 23, 2012, at 8:00 PM, chichibek bros wrote:

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.

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





Loading...