-
Notifications
You must be signed in to change notification settings - Fork 10
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
Mapper afterFind/ afterFindAll.. not firing on related "with". #9
Comments
@kvandelden do you suggests any changes to the way things work here? Perhaps you might have an idea of how this business logic should go or maybe you might suggest a flag option? |
I managed without the related records firing after* events. I ended up writing a bulk record loader to avoid record by record "loadRelationships" calls. This performed better by avoiding latency due to resolving a single record's relationships at a time. The loader would log keys it has to resolve while traversing the relationship tree... (recursively down hasMany relationships).. and finally resolving the belongsTo relationships once all the hasMany relationships were resolved. Each belongsTo relationship target is resolved with a single findAll call. Thanks, K |
@kvandelden we're working on a v4 of js-data. Is this something that you might want to contribute to in the next release? @luisvt has started the TS rewrite already and is on branch |
Cory, I am excited to see js-data advancing into typescript. We use a modified version of js-data in our PwC Performance Analyzer product... We have enhanced, extended the library in a number of ways to improve performance for our data scale.. (Hash Index vs B-Tree, ), usability in line of business applications.. (Key generation, soft deletes, time stamp fields, bulk/atomic saving service). Some of the extensions don't fit the js-data API/ expected test behaviors.. i.e. we generate unique keys for all our records at row creation time, therefore we can use a dictionary for indexing.. also, the bulk writing mechanism API is outside of the standard API for saving records. At the moment, I am committed to deliver an addition to our product.. and consequently, I will not be able to contribute until April. Thanks, Kurt |
This isn't an issue if you believe it's right. v3
When executing a DataStore.find or findAll w/ with: [...] options.
The mapper afterFind/ and afterFindAll will only fire for the top level record(s).
The adapter afterFind/ and afterFindAll will fire for the related records..
When calling loadRelations.. the mapper afterFind/ afterFindAll fire's for everything.
Huge js-data fan.... K
The text was updated successfully, but these errors were encountered: