-
Notifications
You must be signed in to change notification settings - Fork 165
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
RCORE-2265: Fix issue when changing type of primary key #8046
Conversation
If you change the type of the primary key and call Realm::update_schema() without a migration function, the new column will not be set as primary key column.
Pull Request Test Coverage Report for Build jorgen.edelbo_455Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth also testing that this works with exactly one object and fails with two objects.
|
||
CppContext ctx(realm); | ||
std::any values = AnyDict{ | ||
{"_id", UUID("3b241101-0000-0000-0000-4136c566a964"s)}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if the string is not a valid UUID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then shit happens. But that is beside the point of this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Could maybe use some more tests on this special case though if you feel inclined to write them.
If you change the type of the primary key and call Realm::update_schema() without a migration function, the new column will not be set as primary key column.
What, How & Why?
Fixes #8045
☑️ ToDos
bindgen/spec.yml
, if public C++ API changed