Create a new model instance and return its new ID

2008-07-25 Thread GrandiJoos
Hi, I want to create a new model instance from a controller (linked to an other model). The data in the model can be populated by the method itself (user id) etc. Furthermore, the id of the just created model should be returned to use as a foreign key in the current model. How do I do this?

Re: Create a new model instance and return its new ID

2008-07-25 Thread Smelly_Eddie
GJ: When users register on one site onf mine, i automatically add them to a table of news articles. I think this is a similar idea top what you (very) sparsley described. this is calledc from users/register ,and calls a function in a behavior, that User actsas. You could also place directly int