Skip to content

Conversion of python UUIDs to strings is currently broken #50

@stevenmond

Description

@stevenmond

For whatever reason the library can't properly convert a python UUID to a string. I've had to manually cast any python UUID type variable to a string to get queries to work properly. What's happening is if you try something like the following

select(Users).where(Users.id == user_id)

where user_id is of type UUID (i.e. UUID('1daa91d7-8d35-4684-86d6-3fa89042c1f4')) it'll convert it to

SELECT * FROM users WHERE id = '1daa91d78d35468486d63fa89042c1f4'

in order to execute the right query, it needs to be done as

select(Users).where(Users.id == str(user_id))

in order to get

SELECT * FROM users WHERE id = '1daa91d7-8d35-4684-86d6-3fa89042c1f4'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions