Kent wrote:
> For performance reasons, I'd like eagerloading to do inner joins where
> possible.  I found ticket 1544 http://www.sqlalchemy.org/trac/ticket/1544
> addresses exactly this concern, and I've patched the option for
> innerjoin=True.
>
> This works, thank you.
>
> I wanted to point out, however, that the orm relation *should* be able
> to detect scenarios where it is safe to do inner join by default
> instead of this being a manually set flag.
>
> If the join relation foreign key exists on a column that is
> nullable=False, then (double check my logic, but..) isn't it
> guaranteed that an inner join is safe?
>
> If agreed, this would be a nice enhancement.

the potential complication with "automatic" is a join condition that is
more complex than just a simple many-to-one join on a single attribute.  
You also might want innerjoin on some one-to-ones and one-to-manys as
well, those can't be automatic.  So by leaving it manual, at least the
configuration is consistent.

im not opposed to it but by leaving it manual, I don't have to worry about
surprise issues I haven't considered.


>
> --
> 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.
>
>

-- 
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