I am trying to get these mappings right but I just cannot seem to and would love some advice...
Entities\User:
type: entity
oneToMany:
citations:
targetEntity: Citation
mappedBy: user
cascade: ["all"]
Entities\Citation:
type: entity
manyToOne:
item:
targetEntity: Item
inversedBy: citations
joinColumn:
name: item_id
referencedColumnName: id
manyToOne:
user:
targetEntity: User
inversedBy: citations
joinColumn:
name: user_id
referencedColumnName: id
Entities\Item:
type: entity
oneToMany:
authors:
targetEntity: Author
mappedBy: item
cascade: ["all"]
oneToMany:
citations:
targetEntity: Citation
mappedBy: item
Entities\Author:
type: entity
manyToOne:
item:
targetEntity: Item
inversedBy: authors
The errors I get from the schema validator tool are:
[Mapping] FAIL - The entity-class 'Entities\Item' mapping is invalid: * The association Entities\Item#citations refers to the owning side field Entities\Citation#item which does not exist.
[Mapping] FAIL - The entity-class 'Entities\Citation' mapping is invalid: * The association Entities\Citation#user refers to the inverse side field Entities\User#citations which does not exist.
[Mapping] FAIL - The entity-class 'Entities\Author' mapping is invalid: * The association Entities\Author#item refers to the inverse side field Entities\Item#authors which does not exist.
As you can see I have the inverse sides, why is it not seeing them?