> On Oct 17, 2014, at 3:50 PM, JPLaverdure <[email protected]> wrote:
>
> Hi Michael,
>
> My bad, they do indeed only show up on mapping... which takes place when my
> pyramid app instantiates. Sorry for the confusion :)
> Still, they could be unnerving for someone deploying the app. Any way to not
> have these show up ?
> I did look into version_meta.py and tried to make some tweaks when I saw
> anything having to do with the version atribute.. But to no avail.
>
> Your help is greatly appreciated !
it’s not clear why a class that inherits from another needs a separate
“changed” column in any case. The recipe indicates on line 68 this column
is optional so I’d remove it, or just make it conditional if “super_mapper” is
not present to have it only on the base table. or maybe just map it
differently, or not at all, down where it calls mapper():
m = mapper(
versioned_cls,
table,
inherits=super_history_mapper,
polymorphic_on=polymorphic_on,
polymorphic_identity=local_mapper.polymorphic_identity,
exclude_columns=[‘changed’]
)
>
> JP
>
> On Friday, 17 October 2014 14:52:22 UTC-4, JPLaverdure wrote:
> Hello,
>
> It seems a number of SAWarnings are being thrown whenever I instantiate
> Versioned objects which make use of inheritance:
>
> SAWarning: Implicitly combining column container_history.changed with column
> barcoded_container_history.changed under attribute 'changed'.
> Please configure one or more attributes for these same-named columns
> explicitly.
> prop = self._property_from_column(key, prop)
>
> Unfortunately, since these objects are instantiated "auto-magically" by the
> Versioned mixin class, I can't see a way to make these go away or address the
> issue.
> I tried looking into the history_meta.py source and cannot understand why
> this same warning is not being thrown for the "version" attribute.
>
> Anyone has an idea ?
>
> Thanks !
>
> JP
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/sqlalchemy
> <http://groups.google.com/group/sqlalchemy>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.