From the caller side, the returned object may have expired but i don't care (I configure my session maker with expire_on_commit=False)
This works fine, ie the object is detached from the db but immediate attributes are available from reading without any call to a hidden sqlalchemy refresh.
If I want to access linked tables, I just implement it with joinedloads within my api and again the caller can read related attributes.
The problem comes with inherited tables. I would like to be able to tell sqlalchemy to automatically load the child instead of loading the base class (and after issueing a refresh). Here's a sample code: http://pastebin.com/SyKmh9Ac
Line 131 works fine since the requested object is a the base class object
Line 133 does not work since the requested object is a child class object
How can I configure sqa to be able to get the whole child without having later refreshes ?
Thanks a lot for your help,
Pierre