mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #63] [MERGED] Added missing checks for associatation indexes #7663
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?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/63
Author: @chesteroni
Created: 5/29/2011
Status: ✅ Merged
Merged: 6/5/2011
Merged by: @beberlei
Base:
master← Head:master📝 Commits (1)
23540c1Added checking for existing indexes in associatation mapping array.📊 Changes
1 file changed (+20 additions, -12 deletions)
View changed files
📝
lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php(+20 -12)📄 Description
I cam to that problem while running doctrine:mapping:import with 'php' mapping type.
I got in my database (MySQL) three tables (simplified):
categories(
id), messages(id) and categories_messages(categories_id,messages_id).Doctrine threw an exception while importing mappings in php, although in xml it was OK.
The message was:
[ErrorException]
Notice: Undefined index: orderBy in /var/project/vendor/doctrine/lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php line 136
And there were no checks of the existence of indexes in an array so I added those checks and if they return true, copying a value takes place as previous.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.