mapField(array( 'fieldName' => 'id', 'type' => 'integer', 'length' => 4, 'id' => true, 'idGenerator' => '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->mapOneToMany(array( 'fieldName' => 'phonenumbers', 'targetEntity' => 'CmsPhonenumber', 'mappedBy' => 'user' )); $mapping->mapOneToMany(array( 'fieldName' => 'articles', 'targetEntity' => 'CmsArticle', 'mappedBy' => 'user' )); } }