Zzz
unread,Sep 8, 2011, 6:01:42 AM9/8/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to NoRM mongodb
Hi All,
In the NoRM unit tests I see an index to do this:
prods.CreateIndex(j => new { j.Available, j.Inventory.Count },
"complexIndex", true, IndexOption.Ascending);
Where Inventory is of type List<InventoryChange>.
Now, in my situation I really need to create an index on a specific
property of a List of objects. So for example I need to create an
index on InventoryChange.CreatedOn.
This is supported in MongoDB by doing the following:
db.TestProduct.EnsureIndex({"InventoryChange.CreatedOn" : 1});
However in NoRM syntax I cannot find an equivalent. Am I missing
something? Is there some way to do it?
Thanks in advance!!!