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
Service Factory update method cannot remove many to many association. Using the example in the doc manage many-to-many relationship, see the following code to completely remove associations.
By passing an empty array, this should remove all orders from the product. Instead, it doesn't change anything. As long as there's one element in the array, updating association seems to work. But with an empty array, associations are not updated as one would expect.
Bug report
Describe the bug
Service Factory
update
method cannot remove many to many association. Using the example in the doc manage many-to-many relationship, see the following code to completely remove associations.By passing an empty array, this should remove all orders from the product. Instead, it doesn't change anything. As long as there's one element in the array, updating association seems to work. But with an empty array, associations are not updated as one would expect.
System information
Medusa version (including plugins): rc-02
Node.js version: v20
Database: Supabase
Operating system: MacOS 14
Browser (if relevant):
Steps to reproduce the behavior
Expected behavior
Passing an empty array to remove any many to many association
The text was updated successfully, but these errors were encountered: