Thursday, September 3, 2009

Saving Nested HABTM relationships

Alright, I searched the groups was wondering if I could get a little help with this.

Here is the associations.

Record HABTM Product

Product HABTM Status

I know the format for saving HABTM data is [Model][HABTM][HABTM] that is for Record to Product the format would be:

$this->data
{
['Record']
{
array{...}
}
['Product'] {
['Product'] {
0 => ...
1 => ...
}
}

So what I'm curious about is how I would go about saving the HABTM data from Product to Status all in one go. Each array index of 'Product' would have 0-3 'Status' depending on the check boxes. I wonder if a join table for a join table is possible?

Thanks ahead of time for anyone who can tackle this.

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

No comments: