Hi!
There are two related "bugs" with regards to using SO + PostgreSQL's schemas.
If I create the following class:
class MyClass(SQLObject):
class sqlmeta:
table = 'my_schema.my_classes'
temp = StringCol(unique=True)
Then it will generate the unique index as 'my_schema.<index_name>' instead of
just '<index_name>'. This makes the query fail.
The other bug is the reverse operation:
class MyClass(SQLObject):
class sqlmeta:
table = 'my_schema.my_classes'
fromDatabase = True
will raise an exception telling that there's no Primary Key for the
'my_schema.my_classes' table, even though it is there. The bug is that it is
looking for the schema name.
In PostgreSQL indices are created on the same schema that tables are. Since
there's no possibility of having subschemas (yet, at least ;-)), one simple
solution would be splitting on '.' and using the last part as table name while
handling indices and using the full schema name for table operations
(referencing FKs, table creation, etc.).
This bug is preventing the creation of multi-schema databases (and is the only
so
far I can tell!) besides introspecting tables from there...
I'm posting this as ticket #289 (http://sqlobject.gcu.info/trac/ticket/289) on
Trac.
Having this would be great and allow multi-schema databases what is a need for
really big projects.
TIA,
--
Jorge Godoy <[EMAIL PROTECTED]>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss