[sqlalchemy] why does attribute_mapping_collection not throw a valueerror on key mismatch?

2015-12-09 Thread Pau Tallada
Hi, Following on the documentation ( http://docs.sqlalchemy.org/en/latest/orm/collections.html?highlight=collection_class#dictionary-collections ) I seem to understand that attribute_mapped_should verify that the key used is the same as the mapped attribute. And it does, but only in this case:

Re: [sqlalchemy] why does attribute_mapping_collection not throw a valueerror on key mismatch?

2015-12-09 Thread Mike Bayer
On 12/09/2015 12:04 PM, Pau Tallada wrote: > Hi, > > Following on the documentation > (http://docs.sqlalchemy.org/en/latest/orm/collections.html?highlight=collection_class#dictionary-collections) > > I seem to understand that attribute_mapped_should verify that the key > used is the same as

Re: [sqlalchemy] why does attribute_mapping_collection not throw a valueerror on key mismatch?

2015-12-09 Thread Mike Bayer
On 12/09/2015 12:16 PM, Mike Bayer wrote: > > > On 12/09/2015 12:04 PM, Pau Tallada wrote: >> Hi, >> >> Following on the documentation >> (http://docs.sqlalchemy.org/en/latest/orm/collections.html?highlight=collection_class#dictionary-collections) >> >> I seem to understand that

Re: [sqlalchemy] session.is_modified() returns false positives sometimes

2015-12-09 Thread Mike Bayer
On 12/09/2015 02:07 AM, Юрий Пайков wrote: > > Ok, here is the test > code https://gist.github.com/ojomio/941d03b728a88d93d010 > Apart from reproducing the (seeming) problem, it prints out > "PASSIVE_NO_RESULT"(yes, you were right about the name) which is /in/ > committed_state great, thanks.

[sqlalchemy] insert.from_select and include_defaults=True causing bindparam name conflict

2015-12-09 Thread Jonathan Beluch
Hi, using sqlalchemy 1.0.9 and python 2.7.10. import sqlalchemy as sa meta = sa.MetaData() table = sa.Table('mytable', meta, sa.Column('foo', sa.String), sa.Column('bar', sa.String, default='baz'), ) select = sa.select([table.c.foo]) insert = table.insert().from_select(['foo'], select,

Re: [sqlalchemy] session.is_modified() returns false positives sometimes

2015-12-09 Thread Юрий Пайков
Thank you for the detailed explanation of what happens. Now I understand. Shame on me I hadn't noticed this in the docs... Everything which deals with expiration and object state business is always a bit over my head... You said it mostly the flush() business and is_modified() indeed looks like

Re: [sqlalchemy] session.is_modified() returns false positives sometimes

2015-12-09 Thread Mike Bayer
On 12/09/2015 01:18 PM, Юрий Пайков wrote: > Thank you for the detailed explanation of what happens. Now I > understand. Shame on me I hadn't noticed this in the docs... > Everything which deals with expiration and object state business is > always a bit over my head... > > You said it mostly

Re: [sqlalchemy] insert.from_select and include_defaults=True causing bindparam name conflict

2015-12-09 Thread Mike Bayer
On 12/09/2015 12:48 PM, Jonathan Beluch wrote: > Hi, using sqlalchemy 1.0.9 and python 2.7.10. > > | > import sqlalchemy as sa > > meta = sa.MetaData() > table = sa.Table('mytable', meta, > sa.Column('foo', sa.String), > sa.Column('bar', sa.String, default='baz'), > ) > > select =

[sqlalchemy] Table object to mapped class (model)

2015-12-09 Thread Nana Okyere
I'm using the sqlalchemy-datatables library to be able to display tabular data with the jquery datatables library. One of the parameters that I need to create a DataTables object is a mapped class (model) as illustrated on line 50 of the flask example here:

Re: [sqlalchemy] Re: inserts rows in wrong order

2015-12-09 Thread Nana Okyere
Jonathan, thanks a ton. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to