php - symfony2 model with custom primary key name (different than "id") -
can paste example definition of symfony2
/doctrine
model has primary key different id (the name, e.g. primary key customer_id)?
i've been searching web , i've scanned entire cheatsheet (http://ormcheatsheet.com/) couldn't find one.
for example, having following schema:
author: type: entity fields: id: id: true type: integer generator: strategy: auto
what should change replace id author_id preserving remains primary key?
something this?
author: type: entity id: author_id: type: integer generator: strategy: auto fields: name: type: string length: 50
Comments
Post a Comment