[DBAL-206] OraclePlatform causes problems with more schemas with same table names Created: 20/Jan/12  Updated: 21/Jan/12  Resolved: 21/Jan/12

Status: Resolved
Project: Doctrine DBAL
Component/s: Platforms
Affects Version/s: 2.1.5
Fix Version/s: 2.1.6, 2.2
Security Level: All

Type: Bug Priority: Minor
Reporter: Fran Pregernik Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None
Environment:

Oracle database



 Description   

OraclePlatform is using the ALL_* tables to fetch schema information but is only supplying the table name in the where condition. This causes problems when you have multiple schemas with tables that have the same name. Their columns/FK get mixed up.

My colleague and I have traced the problem down to the OraclePlatform class and replaced the ALL_* tables with USER_*. The fix for that is on github https://github.com/FranPregernik/dbal/commit/c70bc462b49a168105304cdff0086dcd15cc347d.

As mentioned in the comment message the other fix would be to fetch the schema name (user) of the table and add it to the where part of the queries. Something like this:

t.owner = user

A pull request has been made on github for this.



 Comments   
Comment by Benjamin Eberlei [ 21/Jan/12 ]

Fixed.

Generated at Thu Dec 18 08:36:09 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.