These are chat archives for canjs/canjs

Jun 2017
Jun 03 2017 22:10
Hi everyone! I have a question about natural ids and the save method. Usually id's are generated server side by the API (surrogate key), but sometimes the id is a natural key and is specified in the app. An example could be a country list, where the id is the three-letter country code. If i create a new country instance and call the method save() it will do a PUT to the API, because save evaluates if the id attribute is present and has a value to determine if its a new instance or a already persisted instance in database. How to solve this cases? Its there a way to call explicit the createData method instead of updateData? THANKS