On further consideration of the interface, what about adding two new
keywords to options() - mapper, and id? That way someone with a large
group of options to set won't have to type the entity name and/or id
on every single option.
session.query(Class).options(options for main
On Dec 12, 2007, at 10:07 AM, Chris M wrote:
On further consideration of the interface, what about adding two new
keywords to options() - mapper, and id? That way someone with a large
group of options to set won't have to type the entity name and/or id
on every single option.
I got the eager loading case to work in 3912. not sure why it didnt
work for you since the approach was similar, but i changed the
interface of eagerload() and similar so you can do eagerload('foo',
SomeOtherClass), where SomeOtherClass you added using add_entity().
thats a little more
Okay, does this mean that options() doesn't go off the last entity or
is this interface just in addition to that behavior?
On Dec 11, 2:35 pm, Michael Bayer [EMAIL PROTECTED] wrote:
I got the eager loading case to work in 3912. not sure why it didnt
work for you since the approach was
On Dec 11, 2007, at 6:21 PM, Chris M wrote:
Okay, does this mean that options() doesn't go off the last entity or
is this interface just in addition to that behavior?
this currently is in lieu of the options goes off the last entity
idea. i tried it that way but this way felt less
Is this how you want to do it? Unfortunately, just your fix alone
doesn't do the trick BUT if you change line 901 of query.py to
context.exec_with_path(m, value.key, value.setup, context,
parentclauses=clauses)
it works, and all ORM tests run fine.
On Dec 8, 10:59 pm, Michael Bayer [EMAIL
On Dec 9, 2007, at 1:21 PM, Chris M wrote:
Is this how you want to do it? Unfortunately, just your fix alone
doesn't do the trick BUT if you change line 901 of query.py to
context.exec_with_path(m, value.key, value.setup, context,
parentclauses=clauses)
it works, and all ORM tests run
Nope, eagerloads are a no-go. I tried changing 901 of query.py again
to:
context.exec_with_path(m, value.key, value.setup, context,
parentclauses=clauses, parentmapper=m)
but that did not work either. The code around exec_with_path and
setup_query confuses me, I'm not sure I can fix eagerloads
I'll commit what I have and some tests sometime soon so you can see
what's going on (unless you're by chance magical and already know
what's going on!)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy
On Dec 9, 2007, at 3:59 PM, Chris M wrote:
I'll commit what I have and some tests sometime soon so you can see
what's going on (unless you're by chance magical and already know
what's going on!)
im doing some surgery on Query at the momentmight be better if you
wait for the next
On Dec 8, 2007, at 6:17 PM, Chris M wrote:
t1, t2 =
Table1
.options
(undefer
(table2.large_col)).join(table2).add_entity(Table2).first()
does not load large_col (or even put it in the SQL sent) on t2. Is
undefer meant for eager loading in this scenario only, or have I
stumbled upon a
options() could work like joinpoints do - after an add_entity,
options() refers to that entity.
On Dec 8, 7:12 pm, Michael Bayer [EMAIL PROTECTED] wrote:
On Dec 8, 2007, at 6:17 PM, Chris M wrote:
t1, t2 =
Table1
.options
(undefer
On Dec 8, 2007, at 7:25 PM, Chris M wrote:
options() could work like joinpoints do - after an add_entity,
options() refers to that entity.
probably. ive been hesitant to make things go off of add_entity() as
of yet.though actually this is probably not very hard to do. youd
have to
One thing I'd be worried about is that after an add_entity there is no
way to set options on the main entity afterwards. You could provide a
reset_entitypoint, but it wouldn't work the same as with joins because
after a reset_joinpoint you can rejoin along the same path to filter
more criterion
On Dec 8, 2007, at 9:55 PM, Chris M wrote:
One thing I'd be worried about is that after an add_entity there is no
way to set options on the main entity afterwards. You could provide a
reset_entitypoint, but it wouldn't work the same as with joins because
after a reset_joinpoint you can
15 matches
Mail list logo