Open Nesse opened 2 years ago
At first glance, it seems like the error might be caused by Deleted eq false
. What happens if you use Deleted eq 0
?
At first glance, it seems like the error might be caused by
Deleted eq false
. What happens if you useDeleted eq 0
?
@steveschmitt The error is the same. I Think this is an issue using $expand with more than 1 level deep.
After some more digging I think the problem is caused by the MySql Connector (MySql.Data.EntityFramework). What are your thoughts?
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Convert.ToDecimal(String value, IFormatProvider provider)
at System.String.System.IConvertible.ToDecimal(IFormatProvider provider)
at System.Convert.ToDecimal(Object value)
at MySql.Data.MySqlClient.MySqlDataReader.GetDecimal(Int32 i)
at MySql.Data.EntityFramework.EFMySqlDataReader.GetDecimal(Int32 ordinal)
Strange that the error is "String was not recognized as a valid Boolean value", but the stack trace shows that it is trying to convert a field to a decimal.
It looks like the error is happening when it is reading the results, so perhaps one of the table fields is mapped to an incompatible C# type. But which one? You may have to remove your expands one at a time until you find which table has the problem.
Any new info on this one?
Hi,
I'm using an implementation of EF 6 using a MySql database. This works great. But now I want to use a BreezeController and here I'm getting some errors => String was not recognized as a valid Boolean value
This is only with some requests using the $expand parameter. This is my request:
Products?$filter=(Id eq 576) and (Deleted eq false)&$expand=ProductPictures,ProductCategories,ProductManufacturers,ProductSpecificationAttributes,ProductTierPrices,StockItems/StockUnits/WarehouseLocation,RelatedProducts,CrossSellProducts,BundledProducts,GroupedProducts,ProductPurchasePrices,ProductGroup,ProductTranslations
I've did some debugging and see that the error message comes from Beeze.WebApi2.QueryHelper:
var listQueryResult = Enumerable.ToList((dynamic)queryResult);
Here is my EF setup:
Does someone knows how to fix this?