Hi,
I just started with Kundera(3.0)-MongoDB. I had written a simple query "Select m from AssetCategory m where m.parentId is NULL"
I was expecting categories whose parent id is null or parent id is missing but I am getting all the records from "AssetCategory including the records whose parentId is not null.
> db.Asset_Category.find()
{ "_id" : "4592cf6a-1145-440d-b231-152815842c53", "NAME" : "TV" }
{ "_id" : "2d1efce9-0e11-4738-9c53-e4e99801896c", "NAME" : "LED", "PARENT_ID" : "4592cf6a-1145-440d-b231-152815842c53" }
{ "_id" : "1ff952d6-7d94-49c1-808e-3aedde6d560f", "NAME" : "Washing Machine" }
what I was expecting is
> db.Asset_Category.find( { PARENT_ID : null} )
{ "_id" : "4592cf6a-1145-440d-b231-152815842c53", "NAME" : "TV" }
{ "_id" : "1ff952d6-7d94-49c1-808e-3aedde6d560f", "NAME" : "Washing Machine" }
I modified the query to "Select m from AssetCategory m where m.parentId = :pid" and passed null for "pid" but I get NPE. shouldn't this converted to "PARENT_ID : null".