I have a standard 1 to Many relationship between two model classes
(declarative base).  In this project I have an Object class that will
have many instances of the Property class.  I added the lazy=False
option to the relationship declaration to force eager loading of
Property instances when I query for an Object instance.  Now, when I
run session.query(model.Object).get(id), SA executes 1 SELECT...JOIN
statement for all columns in both tables.  I would expect SA to do
this.  However, it also executes N SELECT statements for the Property
class, where N equals the number of Property instances linked to the
Object instance.  Am I crazy, or should SA only be executing 1
SELECT...JOIN statement and filling in the relationship with the
result?

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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