Changeset 4789 for trunk/tests/models
- Timestamp:
- 08/22/08 10:05:14 (5 months ago)
- Location:
- trunk/tests/models
- Files:
-
- 4 modified
-
cms/CmsArticle.php (modified) (2 diffs)
-
cms/CmsPhonenumber.php (modified) (1 diff)
-
cms/CmsUser.php (modified) (2 diffs)
-
forum/ForumUser.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/models/cms/CmsArticle.php
r4776 r4789 36 36 )); 37 37 38 /*$mapping->hasMany('CmsComment as comments', array(39 'local' => 'id', 'foreign' => 'article_id'));*/40 38 41 39 $mapping->mapOneToMany(array( … … 44 42 )); 45 43 46 /*$mapping->mapManyToOne(array( 47 'fieldName' => 'author', 44 $mapping->mapManyToOne(array( 45 'fieldName' => 'user', 46 'targetEntity' => 'CmsUser', 48 47 'joinColumns' => array('user_id' => 'id') 49 )); */48 )); 50 49 } 51 50 } -
trunk/tests/models/cms/CmsPhonenumber.php
r4699 r4789 18 18 'id' => true 19 19 )); 20 21 $mapping->mapManyToOne(array( 22 'fieldName' => 'user', 23 'targetEntity' => 'CmsUser', 24 'joinColumns' => array('user_id' => 'id') 25 )); 20 26 } 21 27 } -
trunk/tests/models/cms/CmsUser.php
r4776 r4789 36 36 'length' => 255 37 37 )); 38 39 /*$mapping->hasMany('CmsPhonenumber as phonenumbers', array(40 'local' => 'id', 'foreign' => 'user_id'));41 $mapping->hasMany('CmsArticle as articles', array(42 'local' => 'id', 'foreign' => 'user_id'));*/43 38 44 39 $mapping->mapOneToMany(array( 45 40 'fieldName' => 'phonenumbers', 46 41 'targetEntity' => 'CmsPhonenumber', 47 42 'mappedBy' => 'user' 48 43 )); 49 44 … … 51 46 'fieldName' => 'articles', 52 47 'targetEntity' => 'CmsArticle', 48 'mappedBy' => 'user' 53 49 )); 54 50 -
trunk/tests/models/forum/ForumUser.php
r4776 r4789 22 22 // register subclasses 23 23 $mapping->setSubclasses(array('ForumAdministrator')); 24 // the discriminator column25 $mapping->mapField(array(26 'fieldName' => 'dtype',27 'type' => 'string',28 'length' => 5029 ));30 24 31 25 // column-to-field mapping … … 47 41 'targetEntity' => 'ForumAvatar', 48 42 'joinColumns' => array('avatar_id' => 'id'), 43 'cascade' => array('save') 49 44 )); 50 45