[sqlalchemy] Re: Configuring logging

2007-11-23 Thread Michael Bayer
On Nov 23, 2007, at 6:30 PM, Rick Morrison wrote: > Is there any way to configure logging on an engine instance after > the engine has been instantiated? > > it looks to me as if the engine init checks the module logger status > and sets a couple of flags "_should_log_info" and > "_should_

[sqlalchemy] Re: Using invalid parameter in (un)defer functions doesn't raise exception.

2007-11-23 Thread Roger Demetrescu
hei Michael - On Nov 23, 2007 2:41 PM, Michael Bayer <[EMAIL PROTECTED]> wrote: > > hey Roger - > > assuming this has been confirmed with version 0.4.1 you can add a trac > ticket for this. > > - mike It's done: #878 Cheers, Roger --~--~-~--~~~---~--~~ You rec

[sqlalchemy] Configuring logging

2007-11-23 Thread Rick Morrison
Is there any way to configure logging on an engine instance after the engine has been instantiated? it looks to me as if the engine init checks the module logger status and sets a couple of flags "_should_log_info" and "_should_log_debug". (I'm guessing these are there to keep the logging function

[sqlalchemy] Re: AttributeError: 'ColumnProperty' object has no attribute 'strategy'

2007-11-23 Thread Michael Bayer
On Nov 23, 2007, at 12:53 PM, lur ibargutxi wrote: > my problem is that in my local configuration I have SQLAlchemy0.4.0 > and collective.lead and my aplication work very well but when i try > to do the same thing in the server I have this problem: > > ArgumentError: Error determining primar

[sqlalchemy] Re: merge with dont_load=True and lazy relations

2007-11-23 Thread Michael Bayer
On Nov 23, 2007, at 6:11 AM, Pierre-Yves Strub wrote: > > Hi again, > > Now using SQLAlchemy r3811, using the code at > http://pastie.caboo.se/121148 > > In this case, the merge operation do some lazy loading. When > no inheritance is in use, the behaviour is not visible

[sqlalchemy] Re: Using invalid parameter in (un)defer functions doesn't raise exception.

2007-11-23 Thread Roger Demetrescu
On Nov 23, 2007 2:41 PM, Michael Bayer <[EMAIL PROTECTED]> wrote: > > hey Roger - > > assuming this has been confirmed with version 0.4.1 you can add a trac > ticket for this. I am not in front of a machine with SA installed, but my coworker told me it was 0.4.1... I'll test it at home and add a

[sqlalchemy] Re: AttributeError: 'ColumnProperty' object has no attribute 'strategy'

2007-11-23 Thread lur ibargutxi
my problem is that in my local configuration I have SQLAlchemy0.4.0 and collective.lead and my aplication work very well but when i try to do the same thing in the server I have this problem: ArgumentError: Error determining primary and/or secondary join for relationship 'Areas.idareatype2 (Areaty

[sqlalchemy] Re: Using invalid parameter in (un)defer functions doesn't raise exception.

2007-11-23 Thread Michael Bayer
hey Roger - assuming this has been confirmed with version 0.4.1 you can add a trac ticket for this. - mike On Nov 23, 2007, at 11:09 AM, Roger Demetrescu wrote: > > Hi all, > > A coworker has doing some experiments with deferred column loading and > noticed that SA doesn't raise any excepti

[sqlalchemy] Re: AttributeError: 'ColumnProperty' object has no attribute 'strategy'

2007-11-23 Thread Michael Bayer
On Nov 23, 2007, at 11:08 AM, lur ibargutxi wrote: > Hi! > > I made an aplication in my local machine but when I tried to do the > same in the server I had this problem: > > Module Python expression "view.indicators()", line 1, in > Module Products.odr.lugabe_db.browser.sql, line 23, in ind

[sqlalchemy] Re: AttributeError: 'ColumnProperty' object has no attribute 'strategy'

2007-11-23 Thread klaus
Is it possible that your mapped class has a regular Python property with the same name as a mapped relation? Klaus On 23 Nov., 17:08, "lur ibargutxi" <[EMAIL PROTECTED]> wrote: > Hi! > > I made an aplication in my local machine but when I tried to do the same in > the server I had this problem:

[sqlalchemy] Using invalid parameter in (un)defer functions doesn't raise exception.

2007-11-23 Thread Roger Demetrescu
Hi all, A coworker has doing some experiments with deferred column loading and noticed that SA doesn't raise any exception when defer(), undefer() or undefer_group() are called with an invalid column ou group name. In other words, if you try to follow the example from: http://www.sqlalchemy.org

[sqlalchemy] AttributeError: 'ColumnProperty' object has no attribute 'strategy'

2007-11-23 Thread lur ibargutxi
Hi! I made an aplication in my local machine but when I tried to do the same in the server I had this problem: Module Python expression "view.indicators()", line 1, in Module Products.odr.lugabe_db.browser.sql, line 23, in indicators Module Products.odr.lugabe_db.query, line 48, in first_gro

[sqlalchemy] Re: merge with dont_load=True and lazy relations

2007-11-23 Thread Pierre-Yves Strub
Hi again, Now using SQLAlchemy r3811, using the code at http://pastie.caboo.se/121148 In this case, the merge operation do some lazy loading. When no inheritance is in use, the behaviour is not visible since the lazy loaded instance are already merged in the session (b

[sqlalchemy] Re: merge with dont_load=True and lazy relations

2007-11-23 Thread Pierre-Yves Strub
Hi, Works like a charm for me now :) Thank you ! On Nov 23, 2007 6:37 AM, Michael Bayer <[EMAIL PROTECTED]> wrote: > The first bug is that the merge() dont_load operation was not > completing all the necessary housekeeping on the newly generated copy > of the instance, such that

[sqlalchemy] Re: concurent modification

2007-11-23 Thread Michael Bayer
On Nov 23, 2007, at 3:59 AM, imgrey wrote: > > I was thinking to change isolation level in fact. > > But first, I don't know how to do this with sqlalchemy, second, with > default isolation level commits should work properly weather or not > something were inserted or updated during commit and t

[sqlalchemy] Re: deleting

2007-11-23 Thread Michael Bayer
On Nov 22, 2007, at 1:45 AM, imgrey wrote: > > Good Day sqlalchemy. > > I was searching, but didn't found a way to delete records from db not > executing selection first. > > So, how to represent this SQL statement in slqalchemy ORM : > """ DELETE FROM a WHERE b = c """ ? > just execute the SQL

[sqlalchemy] Re: concurent modification

2007-11-23 Thread imgrey
I was thinking to change isolation level in fact. But first, I don't know how to do this with sqlalchemy, second, with default isolation level commits should work properly weather or not something were inserted or updated during commit and third, I was using nested transaction like this : transa

[sqlalchemy] Re: merge with dont_load=True and lazy relations

2007-11-23 Thread klaus
Fine with me. ;-) Klaus On Nov 23, 6:37 am, Michael Bayer <[EMAIL PROTECTED]> wrote: > Hi there - > > there are actually two bugs here, the second one is revealed after > repairing the first. > > The first bug is that the merge() dont_load operation was not > completing all the necessary housek