mapField(array( 'fieldName' => 'id', 'type' => 'integer', 'id' => true, 'generatorType' => 'auto' )); $mapping->mapField(array( 'fieldName' => 'topic', 'type' => 'string', 'length' => 255 )); $mapping->mapField(array( 'fieldName' => 'text', 'type' => 'string' )); $mapping->mapField(array( 'fieldName' => 'article_id', 'type' => 'integer' )); $mapping->mapManyToOne(array( 'fieldName' => 'article', 'targetEntity' => 'CmsArticle', 'joinColumns' => array('article_id' => 'id') )); } }