-
Notifications
You must be signed in to change notification settings - Fork 19
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
Test cases for regression when retrieving child classes through parent #251
base: main
Are you sure you want to change the base?
Conversation
-fix attribute hash test by precomputing hash -fix issue with comparison test by specifying timestamp precision on table song migration
I was playing around with the idea of adding another select in the What are your thoughts?
|
This pull request has been mentioned on Ortus Solutions Community. There might be relevant details there: |
Another option would be to coalesce the key selections.
|
This is awesome @ryanalbrecht. Nicely done. I hope it gets added to the next Quick version. |
07a2f30
to
68dbfd4
Compare
Its seems between v6 and v9 there was a major regression. ( edit: I think this might have always been this way)
When using multi-table inheritance and you try to load a child class through a parent entity, quick will generate a query that has a join onto each child table. As each child class will often have their foreign key to the parent named the same, this causes an issue when the child class is instantiated as it could land up with an empty value depending on the order of the joins.
This subsequently causes an exception to be thrown when updating loaded entities as the foreign key will not be present in the child class.
This is a big issue and not 100% how to fix it but I created some tests case for showing the failure and the exception