Closed dpk125 closed 7 years ago
Thanks for the PR, @dpk125. This may be a silly question, but I'm wondering whether a simpler approach would be to update the existing calls to flush
so that $mailObject
is passed in - that way only that object will be flushed, without the need for extra config. What do you think?
There are plans to drop support for flushing a single entity: https://github.com/doctrine/doctrine2/issues/6118
Thanks for clarifying. In that case, this approach looks very sensible. Please can you update the documentation to show that this is supported (e.g. with a config example like the one in your PR) and then I'll merge. Thanks!
Thanks for your work here, @dpk125! I've merged this now as you'll see. Sorry for the delay in merging - I didn't see an alert that you'd updated your commit (perhaps because it was an update rather than a new commit) so have only just seen this.
Do you need a release for this or can it wait until we're next doing a release anyway?
@sampart It would be nice to have a new release for this :)
@dpk125 your wish is my command: https://github.com/whiteoctober/WhiteOctoberSwiftMailerDBBundle/releases/tag/1.1.0 :smiley:
Awesome, thanks!
This allows to define separate doctrine entity manager for emails, so when we're flushing spool to the database, only Email entities will be flushed.
Sample doctrine configuration: