DDC-3525: Exception "The column id must be mapped to a field in class" when associationKey used #4340

Open
opened 2026-01-22 14:39:38 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Jan 20, 2015).

Jira issue originally created by user aivus:

I have issue when I use "associationKey"

I create test repo for reproduce this issue:
https://github.com/aivus/symfony2-foreign-bug

  1. composer install
  2. Set DB parameters in app/config/parameters.yml and create DB
  3. php app/console doctrine:schema:create --force
  4. php app/console server:run
  5. Load fixtures: http://127.0.0.1:8000/app/loadFixture
  6. Try to get list: http://127.0.0.1:8000/app_dev.php/admin/app/app/order/list

I make workaround, which works for me (8461111e8a), but I'm not sure about it

Originally created by @doctrinebot on GitHub (Jan 20, 2015). Jira issue originally created by user aivus: I have issue when I use "associationKey" I create test repo for reproduce this issue: https://github.com/aivus/symfony2-foreign-bug 1. composer install 2. Set DB parameters in app/config/parameters.yml and create DB 3. php app/console doctrine:schema:create --force 4. php app/console server:run 5. Load fixtures: http://127.0.0.1:8000/app/loadFixture 6. Try to get list: http://127.0.0.1:8000/app_dev.php/admin/app/app/order/list I make workaround, which works for me (https://github.com/aivus/doctrine2/commit/8461111e8aea98d02175f3642870a689d446beef), but I'm not sure about it
admin added the BugMissing Tests labels 2026-01-22 14:39:38 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jan 21, 2015):

Comment created by aivus:

Add stacktrace

@doctrinebot commented on GitHub (Jan 21, 2015): Comment created by aivus: Add stacktrace
Author
Owner

@Warxcell commented on GitHub (Nov 7, 2017):

+1 I had the same problem.

@Warxcell commented on GitHub (Nov 7, 2017): +1 I had the same problem.
Author
Owner

@lcobucci commented on GitHub (Nov 27, 2017):

@Warxcell sample projects are not really helpful for us because they don't isolate the ORM, could you please send us a failing test case that reproduces that behaviour? It would help us a lot to identify and fix the issue you're describing.

You can find examples on 388afb46d0/tests/Doctrine/Tests/ORM/Functional/Ticket

@lcobucci commented on GitHub (Nov 27, 2017): @Warxcell sample projects are not really helpful for us because they don't isolate the ORM, could you please send us a failing test case that reproduces that behaviour? It would help us a lot to identify and fix the issue you're describing. You can find examples on https://github.com/doctrine/doctrine2/tree/388afb46d0cb3ed0c51332e8df0de9e942c2690b/tests/Doctrine/Tests/ORM/Functional/Ticket
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4340