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

auto, non-int, Primary keys broken. #374

Closed
jdoig opened this Issue Aug 2, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@jdoig
Copy link

jdoig commented Aug 2, 2018

Upgrading from 0.7.2 to 0.7.5 caused breakage where non-ints are used as auto primary keys.
(In this case I have a table with a text pk that's generated by postgres)
https://github.com/ponyorm/pony/blob/orm/pony/orm/core.py?utf8=%E2%9C%93#L1911-L1912

@kozlovsky kozlovsky closed this in a20c9e7 Aug 3, 2018

@sashaaero

This comment has been minimized.

Copy link
Member

sashaaero commented Aug 3, 2018

Thanks for reporting. Fixed.

@sashaaero sashaaero self-assigned this Aug 3, 2018

@sashaaero sashaaero added the bug label Aug 3, 2018

@sashaaero sashaaero added this to the 0.7.6 milestone Aug 3, 2018

kozlovsky added a commit that referenced this issue Aug 8, 2018

Pony ORM Release 0.7.6rc1 (2018-08-08)
# New features

* f-strings support in queries: select(f'{s.name} - {s.age}' for s in Student)
* #344: It is now possible to specify offset without limit: `query.limit(offset=10)`
* #371: Support of explicit casting of JSON expressions to `str`, `int` or `float`
* `@db.on_connect` decorator added

# Bugfixes

* Fix bulk delete bug introduced in 0.7.4
* #370 Fix memory leak introduced in 0.7.4
* Now exists() in query does not throw away condition in generator expression: `exists(s.gpa > 3 for s in Student)`
* #373: 0.7.4/0.7.5 breaks queries using the `in` operator to test membership of another query result
* #374: `auto=True` can be used with all PrimaryKey types, not only int
* #369: Make QueryResult looks like a list object again: add concatenation with lists, `.shuffle()` and `.to_list()` methods
* #355: Fix binary primary keys `PrimaryKey(buffer)` in Python2
* Interactive mode support for PyCharm console
* Fix wrong table aliases in complex queries
* Fix query optimization code for complex queries

kozlovsky added a commit that referenced this issue Aug 10, 2018

Pony ORM Release 0.7.6 (2018-08-10)
# Features since 0.7.5:

* f-strings support in queries: `select(f'{s.name} - {s.age}' for s in Student)`
* #344: It is now possible to specify offset without limit: `query.limit(offset=10)`
* #371: Support of explicit casting of JSON expressions to `str`, `int` or `float`
* `@db.on_connect` decorator added

# Bugfixes

* Fix bulk delete bug introduced in 0.7.4
* #370 Fix memory leak introduced in 0.7.4
* Now `exists()` in query does not throw away condition in generator expression: `exists(s.gpa > 3 for s in Student)`
* #373: 0.7.4/0.7.5 breaks queries using the `in` operator to test membership of another query result
* #374: `auto=True` can be used with all PrimaryKey types, not only `int`
* #369: Make QueryResult looks like a list object again: add concatenation with lists, `.shuffle()` and `.to_list()` methods
* #355: Fix binary primary keys `PrimaryKey(buffer)` in Python2
* Interactive mode support for PyCharm console
* Fix wrong table aliases in complex queries
* Fix query optimization code for complex queries
* Fix a bug with hybrid properties that use external functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.