opened
giovanni-bertoncelli
username_0
<!-- 🚨 STOP 🚨 STOP 🚨 STOP 🚨

Are you using LoopBack version 4? Please report the bug here:
https://github.com/strongloop/loopback-next/issues/new

HELP US HELP YOU, PLEASE
- Do a quick search to avoid duplicate issues
- Provide as much information as possible (reproduction sandbox, use case for features, etc.)
- Consider using a more suitable venue for questions such as Stack Overflow, Gitter, etc.

Please fill in the *entire* template below.

-->

## Steps to reproduce
- Configure the project with the flag `replaceOnPUT: true`
- Create a model and declare an hook on `prototype.updateAttributes`, like this:
```javascript
Task.beforeRemote('prototype.updateAttributes', function(context, opt, next) {
  console.log('here');
})
```
- Calling the PUT on that model does not pass through that beforeRemote.

<!-- Describe how to reproduce the issue -->

## Current Behavior
Calling the PUT on that model does not pass through that beforeRemote.
Only declaring the hook on the `prototype.patchAttributes` will resolve to the expected behaviour.

<!-- Describe the observed result -->

## Expected Behavior
Calling the PUT on that model should pass through the `prototype.updateAttributes` beforeRemote.

<!-- Describe what did you expect instead, what is the desired outcome? -->
prototype.updateAttributes hooks not triggered with replaceOnPUT configuration
issue
created
bajtos
username_1
Thank you @username_0 for reporting the bug. Please note that LoopBack 3 is in maintenance mode, we are fixing only critical bugs and security vulnerabilities. 

Based on your report, there is a reasonable workaround for your issue, thus I don't consider it as critical and closing this issue as "won't fix".
comment
closed
bajtos
username_1
issue