[sqlalchemy] Re: Infinite loop in SA

2009-11-11 Thread Mike Conley
That is pretty much what I expected. Considering it only occurs if the developer writes incorrect code, I wouldn't want to make the performance tradeoff. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" gr

[sqlalchemy] Re: Infinite loop in SA

2009-11-11 Thread Michael Bayer
Mike Conley wrote: > I ran across this when writing some new code. I incorrectly appended > something to a relation and sent SA 0.5.6 off into an infinite loop until > max recursion depth was reached. > > Obviously this is a coding bug on my part, but is it also a bug in SA that > should be fixed?

[sqlalchemy] Re: ConcurrentModificationError exception

2009-11-11 Thread Mike Conley
Thanks, that helps. It looks like the problem is around a M:N relationship. There is some complex logic about whether or not the row on the :N side of the relation should be copied or the original referenced. The related maintenance of the supporting association table causes the update problem. --

[sqlalchemy] Infinite loop in SA

2009-11-11 Thread Mike Conley
I ran across this when writing some new code. I incorrectly appended something to a relation and sent SA 0.5.6 off into an infinite loop until max recursion depth was reached. Obviously this is a coding bug on my part, but is it also a bug in SA that should be fixed? I don't have access to 0.6 rig

[sqlalchemy] Re: ConcurrentModificationError exception

2009-11-11 Thread Michael Bayer
Mike Conley wrote: > I am getting this error on a session.flush(). > > sqlalchemy.orm.exc.ConcurrentModificationError: Updated rowcount 0 > does > not match number of objects updated 1 > > and can't figure out where to start looking. it means an UPDATE was issued towards updating the values o

[sqlalchemy] ConcurrentModificationError exception

2009-11-11 Thread Mike Conley
I am getting this error on a session.flush(). sqlalchemy.orm.exc.ConcurrentModificationError: Updated rowcount 0 does not match number of objects updated 1 and can't figure out where to start looking. The database is sqlite, there are no other users connected to the database, and only one pr

[sqlalchemy] Re: problem with dialects.oracle.base.NUMBER in 0.6

2009-11-11 Thread Eric Smith
Michael Bayer wrote: Thanks for your response. > Eric Smith wrote: >> In 0.6, dialects.oracle.base.NUMBER derives from types.Numeric and >> types.Integer. In 0.5.3, I think the equivalent is >> databases.oracle.OracleNumeric, which just derives from types.Numeric. >> There's a separate databases

[sqlalchemy] Re: problem with dialects.oracle.base.NUMBER in 0.6

2009-11-11 Thread Michael Bayer
Eric Smith wrote: > > In 0.6, dialects.oracle.base.NUMBER derives from types.Numeric and > types.Integer. In 0.5.3, I think the equivalent is > databases.oracle.OracleNumeric, which just derives from types.Numeric. > There's a separate databases.oracle.OracleInteger which just derives > from types

[sqlalchemy] Re: Subquery questions

2009-11-11 Thread Michael Bayer
> On Tue, Nov 10, 2009 at 9:55 PM, jcm wrote: > >> >> Folks, >> >> I could do with some decent docs on subqueries. I've tried to play since you got some help here, I'll also note that I was surprised I didn't have "NOT IN" in the docs so I added that to the ORM tutorial. --~--~-~--~

[sqlalchemy] problem with dialects.oracle.base.NUMBER in 0.6

2009-11-11 Thread Eric Smith
In 0.6, dialects.oracle.base.NUMBER derives from types.Numeric and types.Integer. In 0.5.3, I think the equivalent is databases.oracle.OracleNumeric, which just derives from types.Numeric. There's a separate databases.oracle.OracleInteger which just derives from types.Integer. This new behavior b

[sqlalchemy] Re: problem with dialects.oracle.base.NUMBER in 0.6

2009-11-11 Thread Eric Smith
Eric Smith wrote: > This new behavior breaks my code, because I have something which is > the equivalent of: > > if isinstance(t, types.Integer): > v = int(val) > elif isinstance(t, types.Numeric): > v = Decimal(val) Oops, those should both be issubclass, not issinstance. Eric. --~--~

[sqlalchemy] Re: Multiple relations to the same tabl e using declarative… I think I'm being a total idiot

2009-11-11 Thread Oliver Beattie
And we have a winner. Always check you are actually passing the values to the class constructor that you think you are before posting in a public group, folks. I've think I've succeeded in humiliating myself for today… On Nov 11, 11:52 am, Oliver Beattie wrote: > Hi all, > > I know I'm probably

[sqlalchemy] Multiple relations to the same table us ing declarative… I think I'm being a total idiot

2009-11-11 Thread Oliver Beattie
Hi all, I know I'm probably missing something painfully obvious here, but here goes anyway. I'm trying to create a table which has two foreign keys to a different table, and failing miserably. I understand I'm supposed to use the primaryjoin argument to relation… here's what I have in my class de

[sqlalchemy] Re: what time sqlalchemy 0.6 out?

2009-11-11 Thread Tefnet Developers - Tomasz Jezierski
Dnia 2009-11-10, Wt o godzinie 22:36 -0500, Michael Bayer pisze: > haven't seen a DBAPI for drizzle as of yet. I don't use drizzle myself so I don't know how stable it is... but there is DBAPI for drizzle... https://launchpad.net/drizzle-interface/+milestone/ongoing-development > > > > On No

[sqlalchemy] Re: Adding arbitrary attribute to a model instance during querying

2009-11-11 Thread hb
Thanks a lot for the reply, definitely my code is looking better now. Haldun. --~--~-~--~~~---~--~~ 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 u