I'm not terribly familiar with CouchRest but here's my guess from a quick glance.
I think you need to define your author as another type and reference it accordingly:
This might mean that you have to always make your Couch records get saved in the more complicated array format that you used, even when there's only one author. I suppose you could try it both ways and see if it works.
A good workman is known by his tools.
posted 7 years ago
Thanks for your answer. After trying and trying, I figure that the object returned was an array of objects.
So depending on the scenario, I test if the returned object is an instance of array or something else and then I execute the proper action.
He does not suffer fools gladly. But this tiny ad does: