On Mon, Oct 5, 2009 at 2:52 AM, vekija <[email protected]> wrote:
>
> You'll have to save the topic first and then fetch it's id. From the
> cookbook: "If neither of the associated model records exists in the
> system yet (for example, you want to save a new User and their related
> Profile records at the same time), you'll need to first save the
> primary, or parent model." 
> http://book.cakephp.org/view/84/Saving-Related-Model-Data-hasOne-hasMany-belongsTo
>

You could force Cake to create a textarea anyway
($form->textarea('ForumComment.comment')) and, after saving the Topic,
get the ID and add it to $this->data['ForumComment']['topic_id'] (or
however your model is configured).

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to