Hello.
i have and app with 3 models, associated in this way
class Item extends AppModel {
var $name = "Item";
var $belongsTo = array("Category");
var $hasMany = array(
"Fathers" => array(
"className" => "Relationship",
"foreignKey" => "child_id"
),
"Childrens" => array(
"className" => "Relationship",
"foreignKey" => "father_id"
)
);
var $hasAndBelongsToMany = array("Colour");
}
Note that "Fathers" and "Childrens" are pointing to the same model
("Relationship").
now...
if i try to edit one of my items, with a Father relationship set. the
data won't update.
if i remove any father relationship my edit action will work properly.
i PRed the data in Item::beforeSave and everything looks ok.
any advice?
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