so I am using the Multiple Database Branch of django and currently
have a an app that uses several databases.

one problem I have encountered is that i have a foreign key from a
field in one database to a field in another.

the error I get is
Database1.Table1: 'Table1' is configured to use connection 'Database1'
but has relation with 'Table2', which is configured to use connection
'Database2'

is there a way to define the connection within the foreign key
definition

for my models file for Database 1 I have:

from Database2.models import Table2
class Table1(models.Model):
    id = models.AutoField(primary_key=True)
    brand = models.ForeignKey(Table2, db_column='brand')
    class Meta:
        db_table = 'Table1'

your help is much appreciated.

-Jeff


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to