On 05/19/2017 04:53 PM, Colton Allen wrote:
> I get some issues when appending a model to an "orm.relationship"
> (UnorderableType error). Which is annoying but can be worked around.
that doesn't sound like something in SQLAlchemy
>
> I also use SQLAlchemy-Continuum which seems to have issues with
> retrieving "orm.relationship"s. It will attempt to query using the
> shortuuid type without transforming it to the uuid type.
this sounds like the type does not have proper expression behavior. The
right-hand side of a comparison should be coerced into your type, this
depends on how the UUID type was constructed in sqlalchemy-utils.
Obviously this
> is third-party stuff but I am curious how I could go about creating my
> own relationship mapper. Something that would be resilient enough to
> understand shortuuids need to be converted to UUIDs.
adding your custom type to an MCVE that illustrates the query that is
failing would make it easy to see where it's going wrong
>
> I thought there might be something obviously wrong with my
> implementation (since its my first one) which I why I lead off with that.
I'm not sure that sqlalchemy-utils follows all the changes we've made to
the typing system over the years so it may have behaviors that no longer
work, namely the type coercion thing changed some years back.
> > an email to
sqlalchemy+...@googlegroups.com <javascript:>
> > <mailto:
sqlalchemy+...@googlegroups.com <javascript:>>.
> <javascript:>
> > <mailto:
sqlal...@googlegroups.com <javascript:>>.
> <
https://groups.google.com/group/sqlalchemy>.
> <
https://groups.google.com/d/optout>.
>
> --
> SQLAlchemy -
> The Python SQL Toolkit and Object Relational Mapper
>
>
http://www.sqlalchemy.org/
>
> To post example code, please provide an MCVE: Minimal, Complete, and
> Verifiable Example. See
http://stackoverflow.com/help/mcve for a full
> description.
> ---
> 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
sqlalchemy+...@googlegroups.com
> <mailto:
sqlalchemy+...@googlegroups.com>.