Equivalent functionality to Akita's akitaPreUpdateEntity #243
-
Hello, I am working on migration some Akita code, and one use case we have is an entity that has a nested entity, retrieved by a separate call. When we attempt to update the original list of entities, the nested entity gets overwritten. We solved this in Akita using akitaPreUpdateEntity, and I'm hoping there's some way we can do so in Elf as well. Sample code is below. Thank you!
|
Beta Was this translation helpful? Give feedback.
Answered by
NetanelBasal
Apr 19, 2022
Replies: 1 comment 1 reply
-
If you have a books repository with an update method, you can do it there: class BooksRepo {
updateBooks() {
// this is your middleware
store.update(...)
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
silellak
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you have a books repository with an update method, you can do it there: