Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type of projected uuid from QueryBuilder #1862

Closed
szoupanos opened this issue Aug 8, 2018 · 1 comment
Closed

Type of projected uuid from QueryBuilder #1862

szoupanos opened this issue Aug 8, 2018 · 1 comment

Comments

@szoupanos
Copy link
Contributor

Currently, when a uuid is added to a query projection, QB returns a uuid.UUID type of value.
e.g.

        qb = QueryBuilder()
        qb.append(Node, project=['uuid'],
                  filters={'id': {'==': n.id}})
        [uuid] = qb.first()

This is not what happens in Django. Moreover, it causes other problems as we see at issue #1861
This should happen because uuid is stored as uuid.UUID type in SQLA.

The behaviour of the QB should be uniform in both backends (I would say, return always a unicode uuid, but I am open to suggestions etc)

@sphuber
Copy link
Contributor

sphuber commented Dec 3, 2018

Fixed in #2259

@sphuber sphuber closed this as completed Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants