I'm coding a small api in node.js (express) for my spine.js application. Getting and creating new objects in the database is working pretty well. But on deleting/editing I've git a problem right now. Every object gets an individual id created by the JS app. In the database every entry has a unique key, too.
When I call object.destroy() I can see the ajax request which is sent to my server. But as parameter for the id I always have the id which was given by the app. But for deleting/updating stuff in the database I need the key which is stored in the database (mongoDB in my case) So how can I send the right id to the server or identify the right entry on the server side!?