-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add events before and after handling bulk imports #11532
base: main
Are you sure you want to change the base?
Conversation
I like it. |
Isn't Importing runs before import and Imported runs after import already? |
Existing code is triggered one by one. What I want is complete pre - and post-import data |
src/OrchardCore/OrchardCore.ContentManagement.Abstractions/Handlers/IContentHandler.cs
Outdated
Show resolved
Hide resolved
related #13071 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mention use case under https://github.com/OrchardCMS/OrchardCore/pull/11532/files#r1082149869 Wouldn't you add some to demonstrate how and why you'd use these new events?
src/OrchardCore/OrchardCore.ContentManagement.Abstractions/Handlers/IContentHandler.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.ContentManagement.Abstractions/Handlers/ContentHandlerBase.cs
Outdated
Show resolved
Hide resolved
link to #14630 |
It seems that this pull request didn't really move for quite a while. Is this something you'd like to revisit any time soon or should we close? Please comment if you'd like to pick it up and remove the "stale" label. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You didn't reply here: #11532 (review)
src/OrchardCore/OrchardCore.ContentManagement.Abstractions/Handlers/IBulkContentHandler.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.ContentManagement.Abstractions/Handlers/IBulkContentHandler.cs
Outdated
Show resolved
Hide resolved
…dlers/IBulkContentHandler.cs Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
…dlers/IBulkContentHandler.cs Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
Hmmm. In my scenario, I'm just trying to optimise the speed of the import because I've done a function that maps to a table based on the content type definition, and it doesn't work on its own, so it becomes a question of how to design the example |
Aren't there use cases in OC itself? |
This pull request has merge conflicts. Please resolve those before requesting a review. |
@hyzx86 there's very little remaining here, please reply. |
for instructions on how to resolve the merge conflicts due to #16572 please follow the step listed in this comment. |
@Piedone , Sorry I've been busy lately and missed some information 😐
I mean if I want to test this feature I need to add a default implementation of |
Maybe I can test it this way? var cmanager = (DefaultContentManager)contentManager;
cmanager.BulkContentHandlers.add(new TestBulkContentHandler());
... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, isn't there a use case in Orchard Core where you'd add an IBulkContentHandler
implementation? There is no existing code in OC that would utilize this already? If not, then OK.
src/OrchardCore/OrchardCore.ContentManagement.Abstractions/Handlers/IBulkContentHandler.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.ContentManagement.Abstractions/Handlers/IBulkContentHandler.cs
Outdated
Show resolved
Hide resolved
This pull request has merge conflicts. Please resolve those before requesting a review. |
src/OrchardCore/OrchardCore.ContentManagement/DefaultContentManager.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.ContentManagement/Handlers/DefaultBulkContentEventHandlerBase.cs
Outdated
Show resolved
Hide resolved
…nager.cs Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
…BulkContentEventHandlerBase.cs Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
You need to fix the build errors. When you're done addressing all feedback of a review, click "Re-request review" in the top-right corner for each reviewer when you're ready for another round of review, so they know that you're done. |
Scene:
I am using FreeSql as an ORM tool that supports dictionary type data insertion/update (including batch mode)
http://www.freesql.net/en/guide/insert-or-update.html#_2-ifreesql-insertorupdatedict
related: #8869