MapperException: User#id: The null object does not have a method '[]'.
NoSuchMethodError: method not found: '[]'
Receiver: null
Arguments: ["_id"]
package:redstone_mapper/mapper_factory.dart 358:11 _getOrCreateMapper.
package:redstone_mapper/src/mapper_impl.dart 32:26 _TypeDecoder.convert
package:redstone_mapper/mapper.dart 321:28 GenericTypeCodec.decode
package:redstone_mapper_mongo/manager.dart 101:22 MongoDb.findOne.
I resorted to using MongoDB.collection (...).findOne (...) as it returns a null object when if doesn't find anything. Also, is there a way to use Redstone Mapper to convert a Map to an Object and viceversa? Would really help in this case.
This code that tries to add a user to mongo
gives me this error
I resorted to using
MongoDB.collection (...).findOne (...)
as it returns a null object when if doesn't find anything. Also, is there a way to use Redstone Mapper to convert a Map to an Object and viceversa? Would really help in this case.