article table
Kod
tpsa\StoreBundle\Entity\article:
type: entity
table: null
fields:
id:
type: integer
id: true
generator:
strategy: AUTO
description:
type: string
length: '255'
content:
type: text
length: '65535'
created_at:
type: datetime
length: null
updated_at:
type: datetime
length: null
manyToOne:
author:
targetEntity: user
joinColumn:
name: user_id
referencedColumnName: id
manyToMany:
tags:
targetEnity: tag
inversedBy: article
joinTable:
name: article_tag
joinColumns:
article_id:
referencedColumnName: id
inversedJoinColumns:
tag_id:
referencedColumnName: id
lifecycleCallbacks: { }
type: entity
table: null
fields:
id:
type: integer
id: true
generator:
strategy: AUTO
description:
type: string
length: '255'
content:
type: text
length: '65535'
created_at:
type: datetime
length: null
updated_at:
type: datetime
length: null
manyToOne:
author:
targetEntity: user
joinColumn:
name: user_id
referencedColumnName: id
manyToMany:
tags:
targetEnity: tag
inversedBy: article
joinTable:
name: article_tag
joinColumns:
article_id:
referencedColumnName: id
inversedJoinColumns:
tag_id:
referencedColumnName: id
lifecycleCallbacks: { }
tag table:
Kod
tpsa\StoreBundle\Entity\tag:
type: entity
table: null
fields:
id:
type: integer
id: true
generator:
strategy: AUTO
name:
type: string
length: 255
created_at:
type: datetime
updated_at:
type: datetime
manyToMany:
articles:
targetEnity: article
mappedBy: tags
lifecycleCallbacks: { }
type: entity
table: null
fields:
id:
type: integer
id: true
generator:
strategy: AUTO
name:
type: string
length: 255
created_at:
type: datetime
updated_at:
type: datetime
manyToMany:
articles:
targetEnity: article
mappedBy: tags
lifecycleCallbacks: { }
Przykład ten robiłem wzorując się na dokumentacji ze strony:
[url link="http://www.doctrine-project.org/docs/orm/2.0/en/reference/association-mapping.html"]5. Association Mapping[/url]
Przy generowaniu entities wyskakuje mnie:
Cytat
[ErrorException]
Notice: Undefined index: targetEntity in /var/www/symfony/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php line 391
Notice: Undefined index: targetEntity in /var/www/symfony/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php line 391
Co robie źle?