transactional events in subscriber interface#6996
Conversation
added test for event listeners; updated docs;
|
@imnotjames I'm going to merge this one and release a new version. Do you want to review it before I do that? |
imnotjames
left a comment
There was a problem hiding this comment.
Overall makes sense.
This does make the disparity between listeners, schema listeners, and subscribers wider, but there's already disparity there as it stands.
| /** | ||
| * If this is set to true, SELECT query in a `find` method will be executed in a transaction. | ||
| */ | ||
| transaction?: boolean |
There was a problem hiding this comment.
I'm assuming this was intentionally added but seems to be a separate feature from the rest of this PR
There was a problem hiding this comment.
oh yeah I forgot I need to create a separate branch for this separate feature
yes it does, and here is why: when you run: START TRANSACTION
SELECT * FROM user
COMMITyou execute: entity.beforeTransactionStart()
entity.afterTransactionStart()there is no "entity" before SELECT on which we can call |
…tion in FindOptions (typeorm#6996) * added new decorators * added hooks to etnity subscriber interface * added test code in one query runner * removed new decorators and implemented in subscriber instead * added "transaction" option to FindOneOptions * added event listeners in query runners; added test for event listeners; updated docs; * working on test; * working on test; * added test for `transaction` option; * fixing failing test * fixing failing test * fixing typos * fixing test I broke Co-authored-by: Dmitry Zotov <[email protected]>
…tion in FindOptions (typeorm#6996) * added new decorators * added hooks to etnity subscriber interface * added test code in one query runner * removed new decorators and implemented in subscriber instead * added "transaction" option to FindOneOptions * added event listeners in query runners; added test for event listeners; updated docs; * working on test; * working on test; * added test for `transaction` option; * fixing failing test * fixing failing test * fixing typos * fixing test I broke Co-authored-by: Dmitry Zotov <[email protected]>
No description provided.