It seems RavenDb pluralizes object names when storing them. So a PhoneBook
becomes PhoneBooks
, and PhoneBookCategory
becomes PhoneBookCategories
.
For any ByQueryOperation, if I write the query, I have to address the name of the collection. E.g. here for a bulk delete:
var queryParameters = new Raven.Client.Parameters
{
{
"ids", ids.ToArray()
}
};
var q = new IndexQuery
{
Query = "from {collectionName} u where id(u) in ($ids)",
QueryParameters = queryParameters
};
DeleteByQueryOperation op = new DeleteByQueryOperation(q);
Now, how can I make sure I get the correct collectionName
?