You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the _patch() service method that skips service level hooks I am getting an error from feathers-objection. The service has allowedUpsert enabled. If I don't use _patch and use the regular patch instead, it works fine.
The error is:
error TypeError: Cannot read property 'mergeAllowUpsert' of undefined
at Object._patch (/app/node_modules/feathers-objection/lib/index.js:882:74)
The service is configured like:
export default function (app: Application) {
const options = {
Model: OrderModel,
paginate: app.get('paginate'),
whitelist: ['$eager', '$joinEager'],
allowedEager: '[user, items.[product, fulfillment_method], shipping_address]',
allowedInsert: '[items, shipping_address]',
allowedUpsert: 'shipping_address',
eagerFilters: [
{
expression: 'user',
filter: 'eagerSelects',
},
{
expression: 'items.product',
filter: 'eagerSelects',
},
],
};
// Initialize our service with any options it requires
app.use('/orders', new Orders(options, app));
// Get our initialized service so that we can register hooks
const service = app.service('orders');
service.hooks(hooks);
}
The text was updated successfully, but these errors were encountered:
I jumped the gun a bit on creating this issue. I tried removing the allowedUpsert configuration and the issue persists, so it's not necessarily related to that.
When using the
_patch()
service method that skips service level hooks I am getting an error fromfeathers-objection
. The service hasallowedUpsert
enabled. If I don't use_patch
and use the regularpatch
instead, it works fine.The error is:
The service is configured like:
The text was updated successfully, but these errors were encountered: