mapField(array( 'fieldName' => 'id', 'type' => 'integer', 'length' => 4, 'id' => true, 'generatorType' => 'auto' )); $mapping->mapField(array( 'fieldName' => 'status', 'type' => 'string', 'length' => 50 )); $mapping->mapField(array( 'fieldName' => 'username', 'type' => 'string', 'length' => 255 )); $mapping->mapField(array( 'fieldName' => 'name', 'type' => 'string', 'length' => 255 )); $mapping->hasMany('CmsPhonenumber as phonenumbers', array( 'local' => 'id', 'foreign' => 'user_id')); $mapping->hasMany('CmsArticle as articles', array( 'local' => 'id', 'foreign' => 'user_id')); } }