[sqlalchemy] Re: column_property with load_only and inheritance

2015-12-21 Thread Mattias Lagergren
Hi again, I thought I should reply and update on what the issue was. It might be possible that __declare_last__() isn't appropriate here, can > you try just saying "Context.link = column_property()"... right after > you declare Context? > This was a good advice and ultimately led me to the

[sqlalchemy] Re: column_property with load_only and inheritance

2015-11-05 Thread Mattias Lagergren
Hi again Mike, or anyone else who has some good advice. I've tried a similar setup but with a relation to a sub-class to context and it seems that it doesn't have this problem when using joinedload. Any hints on how to further debug this issue would be helpful Thanks! Mattias L On Tuesday,

Re: [sqlalchemy] Re: column_property with load_only and inheritance

2015-11-05 Thread Mike Bayer
On 11/03/2015 07:32 AM, Mattias Lagergren wrote: Hi Michael, I've been putting together a self-contained example. If you save it to a file test_model you should be able to run it: what's the SQL output with echo=True on the engine? is the subquery for context rendered in the SQL and is

[sqlalchemy] Re: column_property with load_only and inheritance

2015-11-03 Thread Mattias Lagergren
Hi Michael, thank you for your quick response! Yeah, it seems that I got confused about the "load_only" method - it doesn't load at all. I've tried to put together an easier example to show the problem. It seems that it is related to the joinedload. import sqlalchemy.orm import