doctrine2 - Symfony 2 not finding primary key of mapped entity -


i having issue primary key of mapped entity not being detected doctrine.

i have 2 tables, users , operators. there unidirectional many 1 relationship between users , operators.

user entity defined as

xxx\securitybundle\entity\user:     type: entity     repositoryclass: xxx\securitybundle\repository\userrepository     table: xxx_user     id:         id:              type: integer             unsigned: false             nullable: false             column: id             generator:                 strategy: auto     fields:         username:             type: string             length: 32             nullable: false             column: username ...     manytoone:         operator:             targetentity: xxx\coredatabundle\entity\operator             joincolumn:             name: operator_id             referencedcolumnname: id 

the operators entity defined as

xxx\coredatabundle\entity\operator:     type: entity     respositoryclass: xxx\coredatabundle\repository\operatorrepository     table: operators     id:         id:             type: integer             unsigned: false             nullable: false             column: id             generator:                 strategy: auto     fields:         opername:             type: string             length: 32             nullable: false             column: operator_name     

when validating schema, receive following error :

  • the referenced column name 'id' has primary key column on target entity class 'xxx\coredatabundle\entity\operator'.

when try assign operator user, receive following error :

[errorexception]
notice: undefined index: id in vendor/doctrine/orm/lib/doctrine/orm/persisters/basicentitypersister.php line
607

as far can see, 'id' set primary key of operator entity. database behind doctrine oracle, in in sync entity definitions , primary key set correctly on database.

anyone able spot error in defining mapping ?

i not think fact entities in different bundles issue getting similar issues entities in same bundle.

thank you.

oracle's columns , table names uppercase. if using them, need put referencedcolumnname in uppercase if in php side lowercase.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -