mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-56: ManyToMany mapping does not take difference between field name and column name into account #68
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Oct 18, 2009).
Jira issue originally created by user marijn:
The fields of my entities are prefixed with an underscore since they are private variables. Since I don't like my database schema that way I've named all the columns without the underscore, thus far no problems. Now when you create a ManyToMany mapping a problem occurs. The column name in the database is "fieldname" but the fieldname = "_fieldname". We need an annotation in the form of @referencedFieldName to specify the relevant field name.
@doctrinebot commented on GitHub (Oct 18, 2009):
Comment created by romanb:
I dont understand. Can you give an example?
@doctrinebot commented on GitHub (Oct 18, 2009):
Comment created by marijn:
For the example the following model definition is used.
The following query issues this error message: {color:red}ErrorException: Undefined index: id in /path/to/Doctrine/ORM/Mapping/ClassMetadata.php on line 257{color}
@doctrinebot commented on GitHub (Oct 18, 2009):
Comment created by romanb:
Should be fixed now.
@doctrinebot commented on GitHub (Oct 18, 2009):
Issue was closed with resolution "Fixed"