kfiross / flutter_mongodb_realm

Unofficial Flutter plugin for using MongoDB Realm services on Android, iOS and web.
Apache License 2.0
41 stars 17 forks source link

insert MongodbDocument with field _id string and not ObjectId #9

Closed YassKhazzan closed 3 years ago

YassKhazzan commented 4 years ago

hello, im trying an insert in a mongodb atlas collection using stitch.

i can't insert my document because my collection has a schema with _id : string and the stitch plugin use the ObjectId for the _id field.

please help solving this issue, because im trying to use stitch with an existing database and existing schema.

thanks a lot.

kfiross commented 4 years ago

Hi, I will try to fix the issue soon :)

kfiross commented 4 years ago

I know that by default if you don't give an identifier, it will use some ObjectId for the _id field. so, I guess it's the only way you could solve the problem

kfiross commented 4 years ago

?

YassKhazzan commented 4 years ago

Hi and thanks for your answer, the only solution that i found to insert an _id is to remove the mongoAtlas schema. if there is a schema for a collection, the insert dosent work.

kfiross commented 3 years ago

This issue intended to be fixed in v1.2.2