On Sun, 9 Jul 2017 22:55:39 +0200, Sönke Ludwig wrote:

Am 09.07.2017 um 21:07 schrieb Rey Valeza:


I used to be able to search and display the results on my web page using MongoDB but now I am getting this error:


and here are the data structures:

struct Tutor
	string email;
	string uname;
	string password;
	string city;
	string province;
	string country;
	string[] subjects;
	string photo;
	float rating;
	Rating ratings;

The declaration of the ratings field should be typed Rating[]
instead of just Rating, as the BSON data contains an array of objects
for that field.

The third line of the compiler error message gives a hint that this is
the place where things go wrong: deserializeValue!(store.Rating), but
unfortunately the stack trace is quite hard to read due to the long
template symbol names.

Thanks, Sönke! That solved it!