Skip to content

Fix attempt to get column by class property name#27

Closed
dmdeller wants to merge 1 commit intodoctrine:masterfrom
dmdeller:master
Closed

Fix attempt to get column by class property name#27
dmdeller wants to merge 1 commit intodoctrine:masterfrom
dmdeller:master

Conversation

@dmdeller
Copy link

Hi,

After upgrading from a Doctrine 2.0 RC to final version, I noticed a failure when using doctrine orm:schema:create:

  [Doctrine\DBAL\Schema\SchemaException]                 
  There is no column with name '_id' on table 'subuser'.

Since this worked before the upgrade, I investigated and found a new line of code that was attempting to get a column using the class identifier property name (_id) rather than the mapped column name (user_id). Please see patch.

…en the two are different strings.

Example failure case:
    /**
     * @id
     * @column(name="user_id", type="integer")
     * @GeneratedValue(strategy="AUTO")
     * @var int
     */
    protected $_id;
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant