Hello,

I have a form that submits data to two models. The two models are:

Topic(id) hasMany Post(topic_id)
Topic(first_post) belongsTo Post(id)
Topic(last_post) belongsTo Post(id)
Post(topic_id) belongsTo Topic(id)

I'm doing the save in two steps. First save the Topic and Post, then get the
Post.id and update Topic.first_post and Topic.last_post.

The first save works great, validates and if unable to save Post or Topic
nothing gets saved because I use saveAll. IF this works then I get the
Post.id and update Topic.

My question is, if I define Post(id) hasOne Topic(first_id) and Post()
hasOne Topic(last_id) will I be able to skip the second save?

Thanks,
Andrei

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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