[sqlalchemy] Re: how could a foreign key reference a unique (non pk) column combination?

2008-10-01 Thread alex bodnaru
i found it in alchemy: ForeignKeyConstraint(['invoice_id', 'ref_num'], ['invoices.invoice_id', 'invoices.ref_num']) posted on elixir list too, but expressing it in elixir would help a lot, too :) . thanks On Wed, Oct 1, 2008 at 9:26 AM, alex bodnaru [EMAIL PROTECTED] wrote: hello friends,

[sqlalchemy] how could a foreign key reference a unique (non pk) column combination?

2008-10-01 Thread alex bodnaru
hello friends, how could a foreign key reference a unique (but not primary kyey) column combination? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

[sqlalchemy] Instance added to session and flushed by backref before save() is actually called

2008-10-01 Thread Adam Dziendziel
I have a ContentObject class mapped using: co_mapper = orm.mapper(ContentObject, content_objects_table, extension=COMapperExtension(), polymorphic_on=content_objects_table.c.type, polymorphic_identity='ContentObject', properties={ 'theme': orm.relation(Theme), 'resources':

[sqlalchemy] Re: unions in query?

2008-10-01 Thread az
answering myself, well... for the record. i'm back into my hierachy/graph of objects, which has many paths reaching from one end to another - A-Z, A-B-Z, A-B-C-Z etc. Using hierarchical OR (AND (OR ...))) works but gets very slow as all the 20+ tables involved go in same FROM clause. so i

[sqlalchemy] InnoDB - Foreign Key must be an Index

2008-10-01 Thread GustaV
Hi all, I'm experiencing an issue on MySQL (5.0.51a) when sqlalchemy create the tables with foreign keys. The SQL issued : CREATE TABLE `referenced` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ) TYPE = InnoDB; CREATE TABLE `referencing` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `f`

[sqlalchemy] Re: Instance added to session and flushed by backref before save() is actually called

2008-10-01 Thread Michael Bayer
On Oct 1, 2008, at 6:42 AM, Adam Dziendziel wrote: I have a ContentObject class mapped using: co_mapper = orm.mapper(ContentObject, content_objects_table, extension=COMapperExtension(), polymorphic_on=content_objects_table.c.type, polymorphic_identity='ContentObject',

[sqlalchemy] Re: Uppercase column names in table.insert({ })

2008-10-01 Thread Gaetan de Menten
On Mon, Sep 29, 2008 at 4:46 PM, Itamar Ravid [EMAIL PROTECTED] wrote: Thanks for the answer, Mike. I was used to Oracle's behavior while writing raw SQL, in which the case of unquoted column identifiers doesn't matter. This behavior seems reasonable enough, although the inconsistency between

[sqlalchemy] OrderingList and list.sort()

2008-10-01 Thread Adam Dziendziel
Hi, It seems that sorting of ordering list doesn't work. Attribute object.items is an OrderingList: object.items.sort(cmp=my_cmp) The list is sorted, but the ordering column is not updated. I need to call explicitly: object.items._reorder() Maybe override sort() in OrderingList to invoke

[sqlalchemy] Re: Instance added to session and flushed by backref before save() is actually called

2008-10-01 Thread Adam Dziendziel
Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more

[sqlalchemy] Re: InnoDB - Foreign Key must be an Index

2008-10-01 Thread GustaV
Actually, like I said, I tried it on my local config and it worked ok as well! That's why I suspect some MySQL configuration issue but... The only thing I have noticed is the default table format : - InnoDB at home, it works - MyISAM on the server, it fails (it creates InnoDB tables because I ask

[sqlalchemy] Re: Uppercase column names in table.insert({ })

2008-10-01 Thread Michael Bayer
On Oct 1, 2008, at 10:03 AM, Gaetan de Menten wrote: On Mon, Sep 29, 2008 at 4:46 PM, Itamar Ravid [EMAIL PROTECTED] wrote: Thanks for the answer, Mike. I was used to Oracle's behavior while writing raw SQL, in which the case of unquoted column identifiers doesn't matter. This

[sqlalchemy] Re: enumeration values in the column - referenced from another table

2008-10-01 Thread az
maybe try, instead of hiding the conversion inside db-types layer, to move it upper, i.e. make it a real reference/FK-column to real object/table, then make a python property (see synonim) to do the conversion. On Tuesday 30 September 2008 23:20:16 rca wrote: Hi all, my apologies for a

[sqlalchemy] Re: Attribute extension in 0.5rc1

2008-10-01 Thread Brett
I'm using AttributeExtension for my project and it would greatly simplify things if I could receive the events after the attributes are set. Is there any way this will make it into SqlAlchemy? On Sep 28, 8:09 pm, Mike Bernson [EMAIL PROTECTED] wrote: Michael Bayer wrote: On Sep 28, 2008, at

[sqlalchemy] Re: Attribute extension in 0.5rc1

2008-10-01 Thread Michael Bayer
On Oct 1, 2008, at 3:28 PM, Brett wrote: I'm using AttributeExtension for my project and it would greatly simplify things if I could receive the events after the attributes are set. Is there any way this will make it into SqlAlchemy? having the events received before is a strong feature

[sqlalchemy] dictionary size changing on 0.5b3?

2008-10-01 Thread arashf
not sure if this is a known issue. but I thought it'd post it just in case :) Traceback (most recent call last): File /srv/server/metaserver/metaserver/lib/base.py, line 48, in __call__ ret = WSGIController.__call__(self, environ, start_response) File

[sqlalchemy] Re: dictionary size changing on 0.5b3?

2008-10-01 Thread Michael Bayer
its not. multiple threads hitting your Session there ? otherwise might be an async gc.collect() causing that. On Oct 1, 2008, at 9:25 PM, arashf wrote: not sure if this is a known issue. but I thought it'd post it just in case :) Traceback (most recent call last): File

[sqlalchemy] Re: dictionary size changing on 0.5b3?

2008-10-01 Thread jilong
I do not know is the cause of the problem.The availability of source code? 2008/10/2 arashf [EMAIL PROTECTED]: not sure if this is a known issue. but I thought it'd post it just in case :) Traceback (most recent call last): File /srv/server/metaserver/metaserver/lib/base.py, line 48, in

[sqlalchemy] Re: dictionary size changing on 0.5b3?

2008-10-01 Thread Michael Bayer
theres a fix in r5137 which resolves this. On Oct 1, 2008, at 9:25 PM, arashf wrote: not sure if this is a known issue. but I thought it'd post it just in case :) Traceback (most recent call last): File /srv/server/metaserver/metaserver/lib/base.py, line 48, in __call__ ret =