Fix attempt to get column by class property name #27

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant

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.

Fix attempt to get column by class property name, which would fail wh…
…en the two are different strings.

Example failure case:
    /**
     * @Id
     * @Column(name="user_id", type="integer")
     * @GeneratedValue(strategy="AUTO")
     * @var int
     */
    protected $_id;

beberlei added a commit that referenced this pull request Jan 23, 2013

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment