-
Notifications
You must be signed in to change notification settings - Fork 139
Open
Description
Description
I'm trying to add some hooks to a mapper this way:
store.defineMapper('event', {
endpoint: 'events',
schema: eventSchema,
relations: eventRelations,
beforeFindAll: function (id, opts) {
Mapper.prototype.beforeFindAll.call(this, id, opts, result);
hooks.push('user beforeFindAll');
}
});
But the hook is never being called.
I suspect that the problem is: When this [fillIn()](https://github.com/js-data/js-data/blob/v4.0.0-beta.3/src/Mapper.ts#L442)
is called, all hooks already have a value, so fillIn
won't override the value because it already exists.
Environment
- js-data version: 4.0.0-beta4
- node or browser version: Opera 70
- operating system: OSx
Metadata
Metadata
Assignees
Labels
No labels