Description
Summary: This is major, assuming I'm doing it right. Whenever I use Exists on a subdocument, it always returns true, even if the path doesn't actually exist.
Example code:
|
{{ var doc = new Document<dynamic> |
{
|
Id = "Foo::123", |
Content = new |
{
|
Username = "mgroves", |
Profile = new |
{
|
PhoneNumber = "123-456-7890", |
Address = new |
{
|
Street = "123 Main Rd", |
City = "Columbus", |
State = "Ohio" |
}
|
}
|
}
|
};
|
_bucket.Upsert(doc);
|
|
var subDoc = _bucket.LookupIn<dynamic>("Foo::123").Exists("profile.address.state").Execute(); |
Console.WriteLine("Subdoc profile.address.state exists: " + subDoc.Exists("profile.address.state")); |
|
var subDoc2 = _bucket.LookupIn<dynamic>("Foo::123").Exists("profile.address.province").Execute(); |
Console.WriteLine("Subdoc profile.address.province exists: " + subDoc2.Exists("profile.address.province")); |
}}
|
Actual:
The output I'm getting is:
Subdoc profile.address.state exists: True
Subdoc profile.address.province exists: True
Expected
I would expect profile.address.state to be True, but profile.address.province to be False.