slawil
unread,Nov 17, 2007, 5:11:04 AM11/17/07Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to CakePHP Bleeding Edge
Hi,
In cake 1.2 we can now setting "with" key for HABTM. That's work fine
for raed and findAll, but how makes it work with save() without making
new model?
Example:
- Articles (some fileds)
- Tags (some fileds)
- ArticlesTags ( article_id,tag_id, piority)
If we want to save tags by Article model we are making something like
this:
$data['Article'] = $someData;
$data['Tags']['Tags'][] = $tag_id
$this->Article->save($data);
How we can pass value for piority ?
Or if we made model ArticlesTag (and articles_tags table don't have
"id" field PK) how we can save piority for article_tag=1 tag_id=2 ?
Do we have some "cake's way" to do this without model (or model with
PK "id") ?