DDC-3172: [GH-1061] 2.4 Doctrine dont use custom schemas #3953

Closed
doctrinebot opened this Issue Jun 17, 2014 · 1 comment

2 participants

@doctrinebot

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of cirovargas:

Url: #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 sequencename, min_value, increment_by FROM sys.allsequences ".
324 "WHERE SEQUENCE_OWNER = '".strtoupper($database)."'";
325 }
...
387 public function getListViewsSQL($database)
388 {
389: return 'SELECT viewname, text FROM sys.userviews';
390 }

FOR THIS

public function getListSequencesSQL($database,$owner)
{
return "SELECT sequencename, min_value, increment_by FROM sys.allsequences ".
"WHERE SEQUENCE_OWNER = '".$owner."'";
}

/****
 * {@inheritDoc}
 */
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

Issue was closed with resolution "Incomplete"

@Ocramius Ocramius was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment