moleculer-db icon indicating copy to clipboard operation
moleculer-db copied to clipboard

sequelize adapter: Returns an object with undefined _id if idField is not explicitly set

Open Floha258 opened this issue 2 years ago • 1 comments
trafficstars

If you do not explicitly set the idField in a db service's settings, the sequelize adapter (I only know of sequelize doing this, maybe other adapters have the same behavior) returns an object, that has the _id field set explictly to undefined. Is this wanted or an oversight?

Floha258 avatar Feb 01 '23 10:02 Floha258

Because the default id field name is id in sequelize adapter.

icebob avatar Feb 11 '23 20:02 icebob