I have created 680 documents in RavenDB
650 products and 30 categories
I have linked category ids in product documents
Now, how can I get products linked to certain categopries through
query?
Search criteria are name of the product, unitprice, grape, type and
region where grape,type and region are categories
Can you please send me the query to get these results.
sample data:
category1 --
{
"Name": "Cabernet franc",
"CategoryType": "grape",
"CreatedOn": "\/Date(1301498542559)\/",
"CreatedBy": "Importer",
"ModifiedOn": "\/Date(1301498542559)\/",
"ModifiedBy": "Importer"
}
category2 --
{
"Name": "Alsace",
"CategoryType": "region",
"CreatedOn": "\/Date(1301497754168)\/",
"CreatedBy": "Importer",
"ModifiedOn": "\/Date(1301497754168)\/",
"ModifiedBy": "Importer"
}
category3 --
{
"Name": "VDQS",
"CategoryType": "type",
"CreatedOn": "\/Date(1301497754181)\/",
"CreatedBy": "Importer",
"ModifiedOn": "\/Date(1301497754181)\/",
"ModifiedBy": "Importer"
}
product1 --
{
"Name": "wine 1",
"Year": 0,
"Stock": 0,
"UnitPrice": 10.0,
"Volume": "0.75 l",
"IsPromo": false,
"IsPalletWine": false,
"Categories": {
"$type": "System.Collections.Generic.List`1[[System.String,
mscorlib]], mscorlib",
"$values": [
"categories/1",
"categories/2",
"categories/3"
]
},
"CreatedOn": "\/Date(1301498542250)\/",
"CreatedBy": "Importer",
"ModifiedOn": "\/Date(1301498542250)\/",
"ModifiedBy": "Importer"