[sqlalchemy] SA returning indentical instances for distinct rows.

2007-06-15 Thread Andreas Jung
Hi, I have a self-referential mapper that looks like that. Basicially a tree of 'HierarchyNode' where the leafs are 'ArbeitsmittelHierarchyNode' (accessed through the '_tools' property) mapper(HierarchyNode, HierarchyTable, properties={ '_children' : relation(

[sqlalchemy] Re: Failed updates on partitioned tables PostgreSQL

2007-06-15 Thread Daniele Varrazzo
Hello, partitioned tables in PostgreSQL don't report the correct number of updated rows, so updates from a mapper fail. Reported by Antonio on the postgresql-it mailing list. *kwargs) as this issue just was mentioned the other day, the SA workaround would be a dialect-level flag to

[sqlalchemy] Sequences

2007-06-15 Thread voltron
Could someone point me to the documentation about declaring and using Sequence fields in Sqlalchemy? If there are no docs, could someone give a rundown? I can imagine how it could be used, but I´ll be working in the dark without documentation. Thanks

[sqlalchemy] Re: Sequences

2007-06-15 Thread Andreas Jung
--On 15. Juni 2007 12:55:43 + voltron [EMAIL PROTECTED] wrote: Could someone point me to the documentation about declaring and using Sequence fields in Sqlalchemy? Check yourself with the SA docs on sqlalchemy.org under defining sequences. -aj pgpWMRtJ1NwMS.pgp Description: PGP

[sqlalchemy] Re: engine.base._convert_key() fails with long col names

2007-06-15 Thread Michael Bayer
On Jun 14, 2007, at 3:08 PM, Andreas Jung wrote: For course not. As you can see from the traceback this happens on the SA level (using a self-referential mapper). then thats an ORM bug. you need to send me some sample code that reproduces the error. the ORM uses Column-targeting in

[sqlalchemy] Re: Failed updates on partitioned tables PostgreSQL

2007-06-15 Thread Michael Bayer
On Jun 15, 2007, at 3:47 AM, Daniele Varrazzo wrote: Actually sane_rowcount is an effect: the cause is that the table is partitioned. Would partitioned be a better name for the flag? mmm maybe except the sane_rowcount flag is specifically a workaround style flag and other situations

[sqlalchemy] Re: SA returning indentical instances for distinct rows.

2007-06-15 Thread Michael Bayer
On Jun 15, 2007, at 3:19 AM, Andreas Jung wrote: Bug or feature? I cant speak authoritatively here at all since youve given me no information about your schema, ive no idea what AMH_View represents, but AFAICT the queries are correct, and the results you illustate in your console

[sqlalchemy] MySQL specific error in subselect

2007-06-15 Thread Jonathan LaCour
I am having an issue at work with a query that is passing in all of our unit tests against SQLite and PostgreSQL, but is failing in MySQL. Here is a short test case that will show the problem. Any help would be much appreciated!

[sqlalchemy] Re: SA returning indentical instances for distinct rows.

2007-06-15 Thread Andreas Jung
--On 15. Juni 2007 09:46:27 -0400 Michael Bayer [EMAIL PROTECTED] wrote: On Jun 15, 2007, at 3:19 AM, Andreas Jung wrote: Bug or feature? I cant speak authoritatively here at all since youve given me no information about your schema, ive no idea what AMH_View represents, but AFAICT

[sqlalchemy] Re: MySQL specific error in subselect

2007-06-15 Thread Jonathan LaCour
Jonathan LaCour wrote: It appears to me that MySQL doesn't like it when you don't specify a FROM in the subselect, whereas PostgreSQL and SQLite don't care. Responding to myself, I have solved the problem. As it turns out, you can force SQLAlchemy to generate a FROM for the subselect by

[sqlalchemy] Re: MSSQL: using pyODBC

2007-06-15 Thread che
forgot to mention that SA is at revision r2733. --~--~-~--~~~---~--~~ 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,

[sqlalchemy] Re: MSSQL: using pyODBC

2007-06-15 Thread Rick Morrison
Sounds like the invalid cursor state bug that I thought might have been fixed for pyodbc in r2729. Maybe not... Try adding the keyword parameter use_scope_identity = False to the create_engine() call and see if that clears it up. On 6/15/07, che [EMAIL PROTECTED] wrote: forgot to

[sqlalchemy] Re: [RESOLVED]Re: SA returning indentical instances for distinct rows.

2007-06-15 Thread Andreas Jung
--On 15. Juni 2007 16:09:32 +0200 Andreas Jung [EMAIL PROTECTED] wrote: --On 15. Juni 2007 09:46:27 -0400 Michael Bayer [EMAIL PROTECTED] wrote: On Jun 15, 2007, at 3:19 AM, Andreas Jung wrote: Bug or feature? I cant speak authoritatively here at all since youve given me no

[sqlalchemy] Re: MySQL specific error in subselect

2007-06-15 Thread Michael Bayer
if you wrote your above statement directly in SQL, and you reference an outer table in a subquery without putting the table in the subquery's FROM clause (which looks similar to the way a select() in SQLAlcehmy looks), the subquery would also be correlating. so this default is largely based on

[sqlalchemy] UniqueObject recipe and turbogears

2007-06-15 Thread kris
I have been trying to use the unique object recipe ( http://www.sqlalchemy.org/trac/wiki/UsageRecipes/UniqueObject ) with turbogears, but have run in to trouble. In a nut shell sqlalchemy complains that a UniqueName object is attached in multiple sessions and throws an exception. I am not