On Apr 10, 2008, at 7:25 AM, Christoph Haas wrote:
> Dear list,
>
> since I upgraded to 0.4.5 I found that my complete models stopped
> working.
> I think the cause is the "owner" parameter when I define a table.
> Example:
>
>> dns_supermasters_table = sql.Table(
>> 'supermasters', metadata,
>> sql.Column('ip', sql.Unicode(15), nullable=False,
>> primary_key=True),
>> sql.Column('nameserver', sql.Unicode(40), nullable=False),
>> sql.Column('account', sql.Unicode(40)),
>> owner='dnsdhcp'
>> )
>
> ORM queries on that table fail with error messages like:
>
>> InvalidRequestError: Could not find table 'domains' with which to
>> generate a foreign key
>
> If I look at the queries that are generated I see that SQLAlchemy
> prepends
> all table columns with the owner's name. In PostgreSQL that would
> mean the
> schema name (the default schema is "public" unless specified).
> Removing
> the "owner" parameter made my queries work again.
>
> I would still like to set the owner to a certain user so that when the
> tables get created they have a proper ownership. But that is not
> meant to
> specify the schema. :)
"owner" is not used directly by the postgres dialect or the base
compiler in any way when issuing CREATE TABLE statements. Just
remove the parameter...its deprecated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---