Skip to content
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

EntityLoadingEvent is not fired for loading associated entities #2362

Closed
gorbunkov opened this issue Oct 16, 2023 · 0 comments · Fixed by #2504
Closed

EntityLoadingEvent is not fired for loading associated entities #2362

gorbunkov opened this issue Oct 16, 2023 · 0 comments · Fixed by #2504
Assignees
Labels
in: data type: bug Something isn't working
Milestone

Comments

@gorbunkov
Copy link
Contributor

gorbunkov commented Oct 16, 2023

Jmix: 1.5.4 (the same probably for 2.x)

It seems that EntityLoadingEvent is not fired for entities that are associations of the main loaded entity. E.g. when we load an entity A using the dataManager and the entity A has a reference to the entity B (that is included to the fetch plan), the EntityLoadingEvent will be fired for entity A only. However, it is expected that the event should be fired for entity B as well. If the entity B is not included to the fetch plan, the event for it will be fired, because the lazy-loading mechanism will load an additional loading of the entity B using the dataManager.

See forum topics: this and this.

Sample project: loading-event-bug.zip

Consider fixing the issue in Jmix 1.x as well.

QA Notes:

Covered by autotests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data type: bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants