On Oct 17, 2013, at 10:34 AM, Victor Varvariuc <[email protected]> wrote:
> Ok, so the answer is to use 'eager_defaults': True :
>
> class CommonBase(object):
> """Base model for Apilib db-mapped and virtual models.
> """
> __mapper_args__ = {
> # immediately fetch the value of server-generated default values
> after an INSERT or UPDATE
> 'eager_defaults': True,
> }
>
> Looks like it works, but in other models without columns with
> 'server_default' I am getting:
>
> File "../python2.7/site-packages/sqlalchemy/orm/query.py", line 2685, in
> _compile_context
> "No column-based properties specified for "
> InvalidRequestError: No column-based properties specified for refresh
> operation. Use session.expire() to reload collections and related items.
I had observed this issue after my 0.9 based fixes and that should have been
fixed, what SQLA version are you using ?
signature.asc
Description: Message signed with OpenPGP using GPGMail
