mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-3172: [GH-1061] 2.4 Doctrine dont use custom schemas #3931
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 (Jun 17, 2014).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of cirovargas:
Url: https://github.com/doctrine/doctrine2/pull/1061
Message:
When i can access a database with a user and map other user schema, example:
I connect to the server using USER1 credentials and need to use USER2 schema
Ccctually this is not suported:
Sugestions:
set a new config parameter with owner to put on front query like select * from OWNER.TABLE
and on the mapping update query mappings with these:
swap this:
doctrine\dbal\lib\Doctrine\DBAL\Platforms\OraclePlatform.php
public function getListSequencesSQL($database)
322 {
323: return "SELECT sequence_name, min_value, increment_by FROM sys.all_sequences ".
324 "WHERE SEQUENCE_OWNER = '".strtoupper($database)."'";
325 }
...
387 public function getListViewsSQL($database)
388 {
389: return 'SELECT view_name, text FROM sys.user_views';
390 }
FOR THIS
public function getListSequencesSQL($database,$owner)
{
return "SELECT sequence_name, min_value, increment_by FROM sys.all_sequences ".
"WHERE SEQUENCE_OWNER = '".$owner."'";
}
Worked fine for me on tests.
Tnks
@doctrinebot commented on GitHub (Jun 17, 2014):
Issue was closed with resolution "Incomplete"