Replies: 3 comments 16 replies
-
Do you think it would be better to just require importing/injecting Instead of Because having I understand that it's a handy "shortcut", but it's a bit misleading from the API standpoint. |
Beta Was this translation helpful? Give feedback.
-
This API change actually complicates the unit testing when the mock/stub of the repo object is provided as a dependency. It is easier to create a mock/stub for invocation |
Beta Was this translation helpful? Give feedback.
-
One more RFC for this here: #4944 |
Beta Was this translation helpful? Give feedback.
-
Both
persist
andflush
are tied to the EM instance, we have the repository shortcuts but they feel confusing, as they might give users false sense that they do something only with that given entity type. Maybe we should remove them and make theem
getter public instead, to preserve easy access to the functionality.This should be very easy to migrate via simple find/replace, we could provide a codemod too (especially if we will have a codemod for #3982, it could happen in a single run).
69 votes ·
Beta Was this translation helpful? Give feedback.
All reactions