I've been trying to get django working with a legacy system which I
feel could benefit greatly from it, however I've managed to hit a
critical snag. Our setup is such that we have tables in multiple
schemas, so (for example) there might be one called "app_sys" and
another called "app_prod", with tables in each that need to be
accessed.

Initially I had been working with 0.96 and managed to get things
working by specifying db_table values in class Meta with the schema
prefix... for example

class Documents(models.Model):
    documentid = models.IntegerField(primary_key=True,
db_column='documentid')
    # ...etc

    class Meta:
        db_table = 'app_prod.documents'

However, I ended up upgrading to the SVN release (to try and see if
slicing query results worked, they don't seem to with Oracle in .96)
and now I see that table names are quoted. This means my trick doesn't
work anymore, because what gets put into the query is

SELECT "APP_PROD.DOCUMENTS"."DOCUMENTID", <snip>
   FROM "APP_PROD.DOCUMENTS" ...etc

Of course with the quotes, Oracle is looking in the user's schema for
a table named with the period, which doesn't exist. Naturally, what I
was doing was pretty hackish, so I'm not bothered that this particular
approach doesn't work (it seemed pretty sketchy anyways), but on the
other hand if I can't figure out how to specify the full schema and
table name in SOME way, it seems to kill this effort completely.

Does anyone have any ideas for a way around this?
--~--~---------~--~----~------------~-------~--~----~
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