﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
16376	Support for database links	stephane.benchimol@…	nobody	"Currently, Oracle with Django do not support database links (see [http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/ds_concepts002.htm Oracle documentation])

It's used this way in SQL:
{{{
select count(*) from ""MY_TABLE""@""MY_DBLINK"";
}}}

With Django, I tried to passe it through the db_name
{{{
class MyObject(models.Model):
    class Meta:
        managed = False
        db_table = u'""MY_TABLE""@""MY_DBLINK""'
}}}

However, when it comes to write sql, Django use db_table to specify the column names. Using db link, the generated command is not valid:
{{{
SELECT ""MY_TABLE""@""MY_DBLINK"".""COLUMN1"", ""MY_TABLE""@""MY_DBLINK"".""COLUMN2"" FROM ""MY_TABLE""@""MY_DBLINK""
}}}

It should be:
{{{
SELECT ""MY_TABLE"".""COLUMN1""@""MY_DBLINK"", ""MY_TABLE"".""COLUMN2""@""MY_DBLINK"" FROM ""MY_TABLE""@""MY_DBLINK""
}}}

I think it worth to add a new db_link Meta option, eg.
{{{
class MyObject(models.Model):
    class Meta:
        managed = False
        db_table = u'MY_TABLE'
        db_link = u'MY_DBLINK'
}}}

A workaround could be to define a new database access in Django settings. However, I guess in some cases, the remote database could be reached only from the bridge - not directly from Django application. That's why this options should be needed."	New feature	new	Database layer (models, ORM)	dev	Normal		oracle postgres	ian.g.kelly@… diegobz anssi.kaariainen@… Ülgen Sarıkavak	Accepted	0	0	0	0	0	0
