0

I ma trying to use POCO objects derived from an existing Mongo DB and collection. I am just starting and I decided to use the 'sample_mflix' database that is given as an example database. I am currently using the 'movies' collection. When I try to do any query on this collection using my class as the generic argument, I get an error indicating that 'String could not be serialized from Int32'. So two questions. One, does someone have a POCO class for the movies collection in the samples_flix Mongo database? Two, does someone want to share some tips on diagnosing which field worked and which could cause the error (namely int32 to string)?

Kevin Burton
  • 2,032
  • 4
  • 26
  • 43
  • *the 'sample_mflix' database that is given as an example database*, where? Please include the JSON of one of the documents in your post. – Mahdi Nov 27 '19 at 09:54
  • The database I got from here: https://docs.atlas.mongodb.com/sample-data/available-sample-datasets/. I have done a lot of work on the database (locally) since I posted this question. It turns out this database in particular adheres to the variable schema property of Mongo. So the same property may be an int32 for some documents and double for others, etc. Right now I am trying to make the schema more or less uniform. – Kevin Burton Nov 28 '19 at 15:07

0 Answers0