In sails Blueprint API, update action is defined as PATCH /:model/:id. Here 'id' is the primary key of the model. But I need to find a record not from the 'id' but from another column value and update another column value. How can I do this with sails blueprint API?
Sails Js blueprint update without primary key
57 Views Asked by S. Kaushika At
1
There are 1 best solutions below
Related Questions in SAILS.JS
- Unable to set database URL dynamically in Sails.js
- Error: Encountered error during file download: Cannot pipe, not readableCannot pipe, not readable
- Sailsjs upload file nodejs v 18
- Sails.js CSRF token always changing for POST request
- Connect Sails.js to Mongo Atlas
- how to call SailsJs controller function from ExpressJs router?
- Node.js server stops responding to requests
- Node js promise-ftp: Error uploading file: Error: Can't open that file: No such file or directory
- Sails js ORM isssue
- Can not connect to sails socket
- How to achieve non resourceful socket communication with Sails js?
- Why aren't models being imported in my Sails application?
- Sail npm run dev
- Segmentation fault on WSL during Laravel installation
- Unable to run Sails after npm install
Related Questions in BLUEPRINT
- How to correctly Save & Load a Boolean variable in UE
- triangle twice too big for mesh blueprint
- unreal engine 5.3 how to create a zipline?
- Problem with send argument:Address to get func (TACT, TON)
- get text from keyboard advanced framework to browser
- Circular import in Flask using Blueprint
- Changing properties of different types of materials at the same time?
- How to edit children objects in ue5 bp
- How to get a variable from another blueprint in UE5?
- How to rotate Oculus left in UnrealEngine separately
- having problems packaging my game in UE 5.3.2
- React - Toast Render Twice BlueprintJS
- Error with Javax.el dependency when deployed camel blueprint project in Karaf 4.4
- How to replace On Component Begin Overlap Event with an Interface
- Blueprint (XML DSL) in Apache Camel does not let me use PATCH
Related Questions in UPDATEMODEL
- My update function is not working and get exception throw System.NullReferenceException
- Sails Js blueprint update without primary key
- Eloquent - Update eloquent relations with foreach loop
- Update global Model from controllers in SAPUI5
- Inline component is not defined or not allowed (HTTP PUT)
- Laravel | Updating the Logged-In User - save() vs update()
- How to update model on change / date select of p:calendar
- Save search query result into a model with django
- Updating entity framework model after changing the data type of column in database table
- Identifier is Null or empty, entity framework, Update data base
- Yii-2 how to update a record on basis of id
- Updating user model with mongodb
- Update model according to database changes
- Check in controller which input element has been modified
- Error: (intermediate value)(...) is not a function
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The
PATCH /:model/:idis a shadow route(blueprint routes) that allow you quickly have RESTful routes for your models in Sails and as such the signature of it can't be altered.However, you can opt into writing custom routes and an accompanying custom action since you want to have a more custom way of handling requests to such routes.
You can define the route in
config/routes.jsand bind it to a custom action where you can now query with other criteria using the WQL(Waterline Query Language)You can check here on how to write such actions in Sails(you should be writing actions2 style actions if you are in Sails v1 so the article show you how to do that)
https://blog.sailscasts.com/migrating-your-sails-actions-to-actions2/