0

Is it possible to ignore the mongodb realm schema when syncing to mobile?

We have tried specifying all types as string but even then some values fail when it is "1234". Error is thrown update not permitted.

At this point we are so ready to jump ship unless we can ignore the schema.

dnndeveloper
  • 1,631
  • 2
  • 19
  • 36
  • Why would you want to ignore schema? That's a core concept in relational databases and guarantees data integrity? If you are trying to circumvent a coding error, it would be better to address it - can you include the code you're having issues with and include a better description of the issue? – Jay Feb 22 '21 at 18:43
  • I was under the impression MongoDB was a document not a relational database. This is realm (layer on top of MongoDb) which is enforcing the schema for mobile sync I agree and use strongly typed relational databases all the time however this particular app lends itself more toward schema less. – dnndeveloper Feb 22 '21 at 22:24
  • Realm brings a relational flavor and structure to MongoDB's NoSQL Document database back end. So if you want to be schemaless, then Realm is the wrong tool for the job but MongoDB Atlas may be the right tool for the job - you'll just need to approach it outside of Realm as Realm is heavily model/object driven. – Jay Feb 22 '21 at 23:00
  • Thank you Jay. Realm was so close to being just right for us. I guess our roadmap will include migrating to another platform as that level of maintenance and overhead was a main reason we chose nosql. Our enterprise apps must not be the kind atlas is targeting for mobile sync. – dnndeveloper Feb 23 '21 at 12:51
  • For clarity, MongoDB Atlas and Realm (aka MongoDB Realm) are different things. To me Realm represents a 'front end' for interfacing with MongoDB Atlas (the back end if you will) in a structured, object oriented way. But it's only one of many MongoDB products. You can use MongoDB Atlas via Rest, Stitch as well as other options. I would be curious as to why you went with Realm to start with since it's static models are the core of Realm vs a free form non-structured (no schema aka NoSQL) environment. I would reach out to MongoDB with your use case and see if they have a solution. – Jay Feb 23 '21 at 18:04
  • We started with stitch and vuejs. Works great. Then we needed offline mobile which is only offered via realm. The product is a bit immature (realm) compared to firebase. I may tried redux offline and graphql. I did ReachOut to support- we will see what they say. – dnndeveloper Feb 23 '21 at 22:06

0 Answers0