- db.policies.find( { status : { $ne : "expired" }, coverages : { $elemMatch : { type : "liability", rates : { $elemMatch : { rate : { $gte : 100 }, current : true } } } } } ).pretty()
{
"_id" : "1024850AB",
"status" : "draft",
"insured_item" : {
"make" : "Cessna",
"model" : "Skylane",
"year" : 1982,
"serial" : "AB1783A"
},
"insured_parties" : [
ObjectId("5097f7351d9a5941f5111d61")
],
"coverages" : [
{
"type" : "liability",
"limit" : 1000000,
"rates" : [
{
"rate" : 200,
"staff_id" : ObjectId("5097f7351d9a5999f5111d69"),
"date" : ISODate("2012-11-05T17:29:54.561Z"),
"current" : true
}
]
},
{
"type" : "property",
"deductible" : 5000,
"limit" : 100000,
"rates" : [
{
"rate" : 300,
"staff_id" : ObjectId("5097f7351d9a5999f5111d69"),
"date" : ISODate("2012-11-05T17:29:56.561Z"),
"current" : true
}
]
}
],
"underwriting" : {
"staff_id" : ObjectId("5097f84cf8dd729bc7273068"),
"action" : "approved",
"date" : ISODate("2012-11-05T17:33:00.693Z")
}
}
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.