-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Translatable] Ignore notInsertable columns… #2836
base: main
Are you sure you want to change the base?
[Translatable] Ignore notInsertable columns… #2836
Conversation
Would you be able to add unit tests covering this change? Also, the ODM part of this needs an update. The |
Sure. I'll add a unit test and force-push the branch with the changes to ODM. |
Sorry for coming back to you so late. I've been OOO for longer than anticipated. Could you give me a hint on how to trigger the test for the ODM part? As far as I can see, there's currently no existing ODM test for a custom Translation Document, that extends https://github.com/doctrine-extensions/DoctrineExtensions/blob/main/src/Translatable/Document/Translation.php |
If you can, that'd be great. But if it's all too complex (there is a lot of stuff in this package only tested through the ORM), then we can come back around to improving the test coverage later. It looks like there's already a |
in postPersist hook. Respect the column's metadata and don't attempt to insert a column that's flagged to be not-insertable.
Adding this field to the test suit triggers the ignored flag for Doctrine fields.
efc1857
to
15f340c
Compare
Adding a unit test to test custom ODM translation repositories, as there already exist for ORM.
15f340c
to
3a909f4
Compare
in postPersist hook.
Respect the column's metadata and don't attempt to insert a column that's flagged to be not-insertable.
When a custom Translation class configures a field that is flagged as not insertable
then don't attempt to insert the field in the postPersist hook.
While this works with MySql and MariaDB, inserting a generated column in Postgres throws an error.