Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Armoire:
- <?php
- class Armoire extends AppModel {
- public $hasMany = array(
- 'Etage' => array(
- 'className' => 'Etage'
- )
- );
- }
- ?>
- Etage :
- <?php
- class Etage extends AppModel {
- public $belongsTo = array(
- 'Armoire' => array(
- 'className' => 'Armoire',
- 'foreignKey' => 'armoire_id'
- )
- );
- public $hasMany = array(
- 'Livre' => array(
- 'className' => 'Livre'
- )
- );
- }
- ?>
- Livre:
- <?php
- class Livre extends AppModel {
- public $belongsTo = array(
- 'Etage' => array(
- 'className' => 'Etage',
- 'foreignKey' => 'etage_id'
- )
- );
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement