You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Starting on version 2.18.3, attempting to soft delete a record produces a QueryException indicating a SQL syntax issue:
masoniteorm.exceptions.QueryException: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `softdelete_records`.`id` = '1876d130-5c24-47cb-af4e-dff6f77710b3'' at line 1")
I have linked an example project which reproduces the behavior below. The issue seems to begin with some change made as of version 2.18.3. Installing masonite-orm at 2.18.2 no longer reproduces the error. As indicated below and in the example script, I have verified this on 3 different AWS MySql-compatible RDS engines.
My example demos the case of a one-to-many relationship between two model types, mostly because that's how it is in my real-world use case, but it's possible that this could be pared down further, I just haven't had time to test that.
To Reproduce
Steps to reproduce the behavior:
Download example project linked under "code snippets".
Install pip dependencies.
Set up a test mysql database somewhere with an empty schema masonite. (I've tested engines 5.7 & 8.0.)
Configure test database params in config/database.py.
Run migrations: masonite-orm migrate.
Run example file: python example.py.
Expected behavior
Record update to the deleted_at field should succeed.
Describe the bug
Starting on version 2.18.3, attempting to soft delete a record produces a QueryException indicating a SQL syntax issue:
I have linked an example project which reproduces the behavior below. The issue seems to begin with some change made as of version 2.18.3. Installing masonite-orm at 2.18.2 no longer reproduces the error. As indicated below and in the example script, I have verified this on 3 different AWS MySql-compatible RDS engines.
My example demos the case of a one-to-many relationship between two model types, mostly because that's how it is in my real-world use case, but it's possible that this could be pared down further, I just haven't had time to test that.
To Reproduce
Steps to reproduce the behavior:
masonite
. (I've tested engines 5.7 & 8.0.)config/database.py
.masonite-orm migrate
.python example.py
.Expected behavior
Record update to the
deleted_at
field should succeed.Screenshots or code snippets
I have created an example that repros this behavior here: https://github.com/DrewHood-isp/masonite-orm-example
What database are you using?
Additional context
N/a
The text was updated successfully, but these errors were encountered: