> i guess the patch is interacting with that "load_on_pending" stuff, which I 
> probably added for you also.  It would be nice to really work up a "new 
> SQLAlchemy feature: detached/transientobject loading" document that really 
> describes what it is we're trying to do here.    If you were to write such a 
> document, what example would you give as the rationale ?    I know that's the 
> hard part here, but this is often very valuable, to look at your internal 
> system and genericize it into something universally desirable.

As far as such a document, would you want a trac ticket opened with my
use case in a generalized form where others may likely have the same
use case?

Hoping to not upset you here.....:

My "AttributeImpl.callable_" hack to set a transient state's
session_id, load the relationship, and then set it back to None works
for m2o but when it needs to load a collection (or it can't use get()
I presume), then I am hitting this "return None":

class LazyLoader(AbstractRelationshipLoader):
    def _load_for_state(self, state, passive):
        ...
        ...
        lazy_clause = strategy.lazy_clause(state)

        if pending:
            bind_values = sql_util.bind_values(lazy_clause)
            if None in bind_values:
                return None    ###  <================

        q = q.filter(lazy_clause)

in sqla 6.4,
bind_values = sql_util.bind_values(lazy_clause) would return the value
of the foreign key from the transient object

in sqla 7.5,
it returns [None], presumably because the committed values are not
set?

Short term, do you know right off what changed or what I could do to
work around this?

-- 
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, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to