class FirstModel extends AppModel
{
public $hasOne = array('Second');
public $hasMany = array('Third');
}
class SecondModel extend AppModel
{
public $belongsTo = array('First');
}
class ThirdModel extend AppModel
{
public $belongsTo = array('First');
}
On Fri, Sep 6, 2013 at 10:13 AM, Sam <lightaiyee@gmail.com> wrote:
> Dear CakePHP experts,
>
> While designing a database structure, I created 3 tables. There is a
> 1-to-many relationship between the first table and second table. There is
> another 1-to-many relationship between the second table and third table.
> Does CakePHP allow this kind of table relationship? I hope this does not
> sound like a stupid question to the experts here.
>
>
>
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscribe@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/groups/opt_out.
--
Simon Males
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment