0 Entity Command Where clause fails with Boolean attribute? 4 Knolly Shadrache posted 1 Year Ago Hi I'm trying to retrieve entities that have a Boolean attribute set to 'true', but I'm getting a casting error on every variation I try.{% location where:'LargeFormatRoom==true' %}{% endlocation %}and{% location where:'LargeFormatRoom==1' %}{% endlocation %}and{% location where:'LargeFormatRoom=="Yes"' %}{% endlocation %}Produce:Liquid error: Invalid cast from 'System.String' to 'System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'.Can anyone shed light on this please?
Knolly Shadrache one year ago Thanks for this, that should work.I do think that if the actual and expected behaviours differ under one particular setup in a way that isn't in the manual it might be an edge case bug?
Knolly Shadrache one year ago Yes, I agree, but unfortunately the outcome is exactly the same:Liquid error: Invalid cast from 'System.String' to 'System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'.I'm stumped!
Knolly Shadrache one year ago I thought I had found the answer, but it seems not so I deleted it just now.The problem seems to be related to the attribute qualifier which I have in place.If I remove that qualifier I get the same outcome as you are seeing. But If I put the qualifier back again, I get the same error.Is this a bug or am I doing something wrong?
Knolly Shadrache one year ago (edited one year ago) The qualifier I'm using is 'EntityTypeValueId==183', which is location type for a named location.
Knolly Shadrache one year ago (edited one year ago) definitely failing in the same way with AND without LocationTypeValueId == 183 in the where clause of the lava Entity command, and only failing if that qualifier is used on the Location Entity Attribute.