En hier gaan we:je hebt dezelfde aliassen opgegeven voor de relaties.
User:
relations:
viewed_by:
class: View
local: user_id
foreign: viewed_id
type: many
foreignType: one
foreignAlias: viewed
viewed:
class: View
local: user_id
foreign: viewer_id
type: many
foreignType: one
foreignAlias: viewer
Of je stelt de hele veel-op-veel relatie anders in:
User:
relations:
viewed_by:
class: User
local: viewed_id
foreign: viewer_id,
refClass: View
viewed:
class: User
local:viewer_id
foreign: viewed_id
refClass: View
en View
zou eruit moeten zien als
View:
columns:
viewed_id:
type: integer
primary: true
viewer_id:
type: integer
primary: true
Zie de Doctrine-documentatie op veel-op-veel relaties .