agentejo / mongo-lite

Schemaless database on top of SQLite
160 stars 18 forks source link

why does the "_insert" method @ Collection.php return the sqlite-id instead of the generated id? #18

Closed bassauer-storms-media closed 5 years ago

bassauer-storms-media commented 5 years ago

Hey Artur,

when one inserts a single entry to the DB, the insert method (which delegates to _insert) in the Collection.php returns the internal sqlite-ID of the new entry instead of the generated ID ($document['_id'] = isset($document['_id']) ? $document['_id'] : createMongoDbLikeId();).

Could the insert method please return the generated ID or is there a reason why the internal ID (which seems unused) is returned?

friendly regards

bassauer-storms-media commented 5 years ago

thanks for merge!