[sqlalchemy] Re: Eager load working differently?

2006-10-24 Thread Michael Bayer
ok scratch using 0.2.8 - try revision 2059, since the eager query was getting a little too eager. On Oct 24, 2006, at 4:04 AM, Maciej Szumocki wrote: > > > Michael Bayer wrote: >> use backref=backref(somename, lazy=False, ). > > I tried changing backrefs to "backref=backref('middle', > laz

[sqlalchemy] Re: Eager load working differently?

2006-10-24 Thread Michael Bayer
thats a bug. use 0.2.8 for now, ill add a ticket. On Oct 24, 2006, at 4:04 AM, Maciej Szumocki wrote: > > > Michael Bayer wrote: >> use backref=backref(somename, lazy=False, ). > > I tried changing backrefs to "backref=backref('middle', > lazy=False)" in > the above test script, but > hit ano

[sqlalchemy] Re: Eager load working differently?

2006-10-24 Thread Michael Bayer
thats the correct behavior (which was broken previous to 0.2.8 or so). remove the "delete-orphan" cascade from the mapping, else you cannot save an Action without a parent Project (thats the definition of an "orphan"). On Oct 24, 2006, at 7:39 AM, saw wrote: > > This may be related. I'm p

[sqlalchemy] Re: Eager load working differently?

2006-10-24 Thread saw
This may be related. I'm pretty sure this worked in 0.2.6. It's not working in 0.3. If I create an action without a project (project is None): action = Action(title=title, notes=notes, project=project, context=context, priority=int(priority), closed=0) action.flush() I get "FlushError: instance

[sqlalchemy] Re: Eager load working differently?

2006-10-24 Thread Maciej Szumocki
Michael Bayer wrote: > use backref=backref(somename, lazy=False, ). I tried changing backrefs to "backref=backref('middle', lazy=False)" in the above test script, but hit another issue then: Traceback (most recent call last): File "C:\svn\devel\utils\eagerload.py", line 66, in ? test(Fals

[sqlalchemy] Re: Eager load working differently?

2006-10-23 Thread Michael Bayer
use backref=backref(somename, lazy=False, ). On Oct 23, 2006, at 8:19 AM, Maciej Szumocki wrote: > > After some more testing (the use of loggers in sqlalchemy helped alot > :)) i have narrowed the issue to backreference creation - they seem to > be always created lazy, even if relation is set t

[sqlalchemy] Re: Eager load working differently?

2006-10-23 Thread Maciej Szumocki
After some more testing (the use of loggers in sqlalchemy helped alot :)) i have narrowed the issue to backreference creation - they seem to be always created lazy, even if relation is set to eager. Here's a simple test script (not in unittest format unfortunately as i'm not sure how to make one t

[sqlalchemy] Re: Eager load working differently?

2006-10-20 Thread Michael Bayer
eager loading should be working fine. you need to post a test case that reproduces the problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@go