sails-mysql-transactions icon indicating copy to clipboard operation
sails-mysql-transactions copied to clipboard

Remove transactionId from results

Open bputt opened this issue 9 years ago • 2 comments

If I do the following:

Model.find().exec(function(err, data){
    return data;
});

The array contains objects and one of the values in the object is transactionId. Currently I'm looping through the data and deleting that field.

bputt avatar Sep 22 '15 03:09 bputt

This is currently a limitation of the implementation. The transaction ID field is required in order to get waterline to pass the id from controller / model to the adapter.

We are working to modify waterline so that this behaviour is no longer needed.

shamasis avatar Sep 24 '15 07:09 shamasis

We just made some headway in this. The newly added .count method is completely not reliant on transactionId field. Hoping to refactor the rest of the waterline methods to act this way too.

shamasis avatar Dec 30 '15 07:12 shamasis