Bug #76466 Error parsing boolean's on eager load (EF)
Submitted: 23 Mar 2015 23:09 Modified: 16 Oct 2017 14:31
Reporter: Emanuel Gianico Email Updates:
Status: Verified Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:6.9.6 OS:Microsoft Windows
Assigned to: CPU Architecture:Any
Tags: EF, entity framework

[23 Mar 2015 23:09] Emanuel Gianico
Description:
Hi everyone! I have a problem working with Entity Framework 6. Usually the MySQL Data Entities implementations works fine, but when I work with eager loading of related entities, it throw an exception:

"String was not recognized as a valid Boolean", this is the exception stack trace:

"System.FormatException occurred
  HResult=-2146233033
  Message=No se puede reconocer la cadena como un tipo booleano válido. (String was not recognized as a valid Boolean) 
  Source=mscorlib
  StackTrace:
       en System.Boolean.Parse(String value)
       en System.String.System.IConvertible.ToBoolean(IFormatProvider provider)
       en System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
       en MySql.Data.Entity.EFMySqlDataReader.ChangeType(Object sourceValue, Type targetType)
       en MySql.Data.Entity.EFMySqlDataReader.GetValue(Int32 ordinal)
       en System.Data.Entity.Core.Common.Internal.Materialization.Shaper.ErrorHandlingValueReader`1.GetUntypedValueDefault(DbDataReader reader, Int32 ordinal)
       en System.Data.Entity.Core.Common.Internal.Materialization.Shaper.ErrorHandlingValueReader`1.GetValue(DbDataReader reader, Int32 ordinal)
       en System.Data.Entity.Core.Common.Internal.Materialization.Shaper.GetPropertyValueWithErrorHandling[TProperty](Int32 ordinal, String propertyName, String typeName)
       en lambda_method(Closure , Shaper )
       en System.Data.Entity.Core.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)
       en System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.RowNestedResultEnumerator.MaterializeRow()
       en System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.RowNestedResultEnumerator.MoveNext()
       en System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.ObjectQueryNestedEnumerator.TryReadToNextElement()
       en System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.ObjectQueryNestedEnumerator.ReadElement()
       en System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.ObjectQueryNestedEnumerator.MoveNext()
       en System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
       en System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
       en System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__1[TResult](IEnumerable`1 sequence).
       en System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
       en System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
       en System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression)
       en System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
       en Infinity.Services.EstudioService.getGCR(Estudio estudio) en C:\Users\Emanuel\Desktop\SISTEMAS\Infinity\Clases\Services\Estudio\EstudioService.vb:línea 97
  InnerException: "

This only happend when I try to eager load more than 2 entities, very weird IHMO.

How to repeat:
This is the linq code:

    Dim xa = _repo.Querify().Where(Function(t) t.Id = estudio.Id).AsNoTracking().
                    Include(Function(t) t.Resultados).Include(Function(t) t.Contactos).
                    Include(Function(t) t.TipoGestiones)

This is the generated SQL:

SELECT
`UnionAll2`.`C2` AS `C1`, 
`UnionAll2`.`C3` AS `C2`, 
`UnionAll2`.`C4` AS `C3`, 
`UnionAll2`.`C5` AS `C4`, 
`UnionAll2`.`C6` AS `C5`, 
`UnionAll2`.`C7` AS `C6`, 
`UnionAll2`.`C1` AS `C7`, 
`UnionAll2`.`C8`, 
`UnionAll2`.`C9`, 
`UnionAll2`.`C10`, 
`UnionAll2`.`C11`, 
`UnionAll2`.`C12`, 
`UnionAll2`.`C13`, 
`UnionAll2`.`C14`, 
`UnionAll2`.`C15`, 
`UnionAll2`.`C16`, 
`UnionAll2`.`C17`, 
`UnionAll2`.`C18`, 
`UnionAll2`.`C19`, 
`UnionAll2`.`C20`, 
`UnionAll2`.`C21`, 
`UnionAll2`.`C22`, 
`UnionAll2`.`C23`, 
`UnionAll2`.`C24`, 
`UnionAll2`.`C25`, 
`UnionAll2`.`C26`, 
`UnionAll2`.`C27`, 
`UnionAll2`.`C28`, 
`UnionAll2`.`C29`, 
`UnionAll2`.`C30`, 
`UnionAll2`.`C31`
FROM ((SELECT
`UnionAll1`.`C1`, 
`UnionAll1`.`Id` AS `C2`, 
`UnionAll1`.`Id1` AS `C3`, 
`UnionAll1`.`Razon_social` AS `C4`, 
`UnionAll1`.`Cuit` AS `C5`, 
`UnionAll1`.`Fecha_alta` AS `C6`, 
`UnionAll1`.`Id_base` AS `C7`, 
`UnionAll1`.`Id2` AS `C8`, 
`UnionAll1`.`Nombre` AS `C9`, 
`UnionAll1`.`Tipo` AS `C10`, 
`UnionAll1`.`Clase` AS `C11`, 
`UnionAll1`.`Id_estudio` AS `C12`, 
`UnionAll1`.`Id_codigo` AS `C13`, 
`UnionAll1`.`Id_accion` AS `C14`, 
`UnionAll1`.`Id_categoria` AS `C15`, 
`UnionAll1`.`C2` AS `C16`, 
`UnionAll1`.`C3` AS `C17`, 
`UnionAll1`.`C4` AS `C18`, 
`UnionAll1`.`C5` AS `C19`, 
`UnionAll1`.`C6` AS `C20`, 
`UnionAll1`.`C7` AS `C21`, 
`UnionAll1`.`C8` AS `C22`, 
`UnionAll1`.`C9` AS `C23`, 
`UnionAll1`.`C10` AS `C24`, 
`UnionAll1`.`C11` AS `C25`, 
`UnionAll1`.`C12` AS `C26`, 
`UnionAll1`.`C13` AS `C27`, 
`UnionAll1`.`C14` AS `C28`, 
`UnionAll1`.`C15` AS `C29`, 
`UnionAll1`.`C16` AS `C30`, 
`UnionAll1`.`C17` AS `C31`
FROM ((SELECT
CASE WHEN (`Extent2`.`Id` IS  NULL) THEN (NULL)  ELSE (1) END AS `C1`, 
`Extent1`.`Id`, 
`Extent1`.`Id` AS `Id1`, 
`Extent1`.`Razon_social`, 
`Extent1`.`Cuit`, 
`Extent1`.`Fecha_alta`, 
`Extent1`.`Id_base`, 
`Extent2`.`Id` AS `Id2`, 
`Extent2`.`Nombre`, 
`Extent2`.`Tipo`, 
`Extent2`.`Clase`, 
`Extent2`.`Id_estudio`, 
`Extent2`.`Id_codigo`, 
`Extent2`.`Id_accion`, 
`Extent2`.`Id_categoria`, 
NULL AS `C2`, 
NULL AS `C3`, 
NULL AS `C4`, 
NULL AS `C5`, 
NULL AS `C6`, 
NULL AS `C7`, 
NULL AS `C8`, 
NULL AS `C9`, 
NULL AS `C10`, 
NULL AS `C11`, 
NULL AS `C12`, 
NULL AS `C13`, 
NULL AS `C14`, 
NULL AS `C15`, 
NULL AS `C16`, 
NULL AS `C17`
FROM `estudio` AS `Extent1` LEFT OUTER JOIN `vw_estudio_resultados` AS `Extent2` ON `Extent1`.`Id` = `Extent2`.`Id_estudio`
 WHERE `Extent1`.`Id` = 1) UNION ALL (SELECT
2 AS `C1`, 
`Extent3`.`Id`, 
`Extent3`.`Id` AS `Id1`, 
`Extent3`.`Razon_social`, 
`Extent3`.`Cuit`, 
`Extent3`.`Fecha_alta`, 
`Extent3`.`Id_base`, 
NULL AS `C2`, 
NULL AS `C3`, 
NULL AS `C4`, 
NULL AS `C5`, 
NULL AS `C6`, 
NULL AS `C7`, 
NULL AS `C8`, 
NULL AS `C9`, 
`Extent4`.`Id` AS `Id2`, 
`Extent4`.`Nombre`, 
`Extent4`.`Id_estudio`, 
`Extent4`.`Contacto`, 
`Extent4`.`No_contacto_required`, 
`Extent4`.`Sistema`, 
`Extent4`.`Puntaje`, 
`Extent4`.`Color`, 
NULL AS `C10`, 
NULL AS `C11`, 
NULL AS `C12`, 
NULL AS `C13`, 
NULL AS `C14`, 
NULL AS `C15`, 
NULL AS `C16`, 
NULL AS `C17`
FROM `estudio` AS `Extent3` INNER JOIN `vw_estudio_contactos` AS `Extent4` ON `Extent3`.`Id` = `Extent4`.`Id_estudio`
 WHERE `Extent3`.`Id` = 1)) AS `UnionAll1`) UNION ALL (SELECT
3 AS `C1`, 
`Extent5`.`Id`, 
`Extent5`.`Id` AS `Id1`, 
`Extent5`.`Razon_social`, 
`Extent5`.`Cuit`, 
`Extent5`.`Fecha_alta`, 
`Extent5`.`Id_base`, 
NULL AS `C2`, 
NULL AS `C3`, 
NULL AS `C4`, 
NULL AS `C5`, 
NULL AS `C6`, 
NULL AS `C7`, 
NULL AS `C8`, 
NULL AS `C9`, 
NULL AS `C10`, 
NULL AS `C11`, 
NULL AS `C12`, 
NULL AS `C13`, 
NULL AS `C14`, 
NULL AS `C15`, 
NULL AS `C16`, 
NULL AS `C17`, 
`Extent6`.`Id` AS `Id2`, 
`Extent6`.`Nombre`, 
`Extent6`.`Id_estudio`, 
`Extent6`.`Elegible`, 
`Extent6`.`Llamada`, 
`Extent6`.`Plan`, 
`Extent6`.`Llamada_saliente`, 
`Extent6`.`Sistema`
FROM `estudio` AS `Extent5` INNER JOIN `vw_estudio_tipogestion` AS `Extent6` ON `Extent5`.`Id` = `Extent6`.`Id_estudio`
 WHERE `Extent5`.`Id` = 1)) AS `UnionAll2`
 ORDER BY 
`UnionAll2`.`C3` ASC, 
`UnionAll2`.`C1` ASC

Suggested fix:
I suspect that the problem relies in MySql.Data.Entity.EFMySqlDataReader.ChangeType. Probably is passing an string "1", "0" or something like that, causing that System.Boolean.Parse to fail.
[23 Mar 2015 23:12] Emanuel Gianico
Title change in order to make it more clear.
[23 Mar 2015 23:16] Emanuel Gianico
My entities: 

Public Class Estudio
        Public Overridable Property Id As Integer
        Public Overridable Property Razon_social As String
        Public Overridable Property Cuit As String
        Public Overridable Property Fecha_alta As DateTime
        Public Overridable Property Id_base As Integer

        Public Overridable Property Usuarios As ICollection(Of Usuario)

        Public Property TipoGestiones As ICollection(Of EstudioTipoGestion)
        Public Property Filtros As ICollection(Of EstudioFiltro)
        Public Property Contactos As ICollection(Of EstudioContacto)
        Public Property Sujetos As ICollection(Of Entities.Sujeto)
        Public Property Resultados As ICollection(Of EstudioResultado)

        Public Overridable Property Categorias As ICollection(Of EstudioCategoria)
        Public Overridable Property Bancos As ICollection(Of EmpresaMedioPago)
        Public Overridable Property MediosPago As ICollection(Of MedioPago)
        Public Overridable Property CarteraQuita As ICollection(Of EstudioCarteraQuita)
        Public Overridable Property Rrpp As ICollection(Of EstudioPersona)
        Public Overridable Property RrppTelefonos As ICollection(Of EstudioTelefono)
End Class

Public Class EstudioResultado
        Public Overridable Property Id As Integer
        Public Overridable Property Nombre As String
        Public Overridable Property Tipo As String
        Public Overridable Property Clase As String
        Public Overridable Property Id_estudio As Integer
        Public Overridable Property Id_codigo As Integer

        Public Overridable Property Id_accion As Integer
        Public Overridable Property Id_categoria As Integer

        Public Overridable Property Filtro As EstudioFiltro
        Public Overridable Property Accion As SujetoAccion
        Public Overridable Property Categoria As EstudioCategoria
        Public Overridable Property Contactos As ICollection(Of EstudioContacto)
        Public Overridable Property Resultados As ICollection(Of EstudioResultado)
End Class

Public Class EstudioContacto
        Public Overridable Property Id As Integer
        Public Overridable Property Nombre As String
        Public Overridable Property Id_estudio As Integer
        Public Overridable Property Contacto As Boolean
        Public Overridable Property No_contacto_required As Boolean
        Public Overridable Property Sistema As Boolean
        Public Overridable Property Puntaje As Integer
        Public Overridable Property Color As String

        Public Overridable Property Resultados As ICollection(Of EstudioResultado)
        Public Overridable Property TipoGestiones As ICollection(Of EstudioTipoGestion)
    End Class

Public Class EstudioTipoGestion
        Public Overridable Property Id As Integer
        Public Overridable Property Nombre As String
        Public Overridable Property Id_estudio As Integer

        Public Overridable Property Elegible As Boolean
        Public Overridable Property Llamada As Boolean
        Public Overridable Property Plan As Boolean
        Public Overridable Property Llamada_saliente As Boolean
        Public Overridable Property Sistema As Boolean

        Public Overridable Property Contactos As ICollection(Of EstudioContacto)
    End Class
[30 Mar 2015 5:57] Chiranjeevi Battula
Hello Emanuel Gianico,

Thank you for the bug report.
I tried to reproduce the steps at my end using VB 2013, MySQL Connector/Net 6.9.6 and EntityFramework(6.1.3), but couldn't trace out any issue with EagerLoad.
Could you please list out the steps you tried out at your end? Please provide repeatable steps for us to confirm this issue at our end.

Thanks,
Chiranjeevi.
[30 Mar 2015 19:02] Emanuel Gianico
Yes, first thing you need is the sql dump to create and populate the test database.

http://pastebin.com/AJp0T3B9

Second, here you have the Test Project (A simple winforms application with everything configured (Last mysql and mysql.entity (6.9.6) from nuget, entity framework 6.1.3, etc). Just remember to change the connectionstring from App.config. 

https://drive.google.com/file/d/0B6HefFqn_h-FUzZJbDFZeTI1ZGc/view?usp=sharing
[2 Apr 2015 7:39] Chiranjeevi Battula
Hello Emanuel Gianico,

Thank you for your feedback.
Verified this behavior on VB 2013, MySQL Connector/Net 6.9.6 and EntityFramework(6.1.3).

Thanks,
Chiranjeevi.
[2 Apr 2015 7:39] Chiranjeevi Battula
Generated SQL:

SELECT 
    `UnionAll2`.`C2` AS `C1`,
    `UnionAll2`.`C3` AS `C2`,
    `UnionAll2`.`C4` AS `C3`,
    `UnionAll2`.`C5` AS `C4`,
    `UnionAll2`.`C6` AS `C5`,
    `UnionAll2`.`C7` AS `C6`,
    `UnionAll2`.`C1` AS `C7`,
    `UnionAll2`.`C8`,
    `UnionAll2`.`C9`,
    `UnionAll2`.`C10`,
    `UnionAll2`.`C11`,
    `UnionAll2`.`C12`,
    `UnionAll2`.`C13`,
    `UnionAll2`.`C14`,
    `UnionAll2`.`C15`,
    `UnionAll2`.`C16`,
    `UnionAll2`.`C17`,
    `UnionAll2`.`C18`,
    `UnionAll2`.`C19`,
    `UnionAll2`.`C20`,
    `UnionAll2`.`C21`,
    `UnionAll2`.`C22`,
    `UnionAll2`.`C23`,
    `UnionAll2`.`C24`,
    `UnionAll2`.`C25`,
    `UnionAll2`.`C26`,
    `UnionAll2`.`C27`,
    `UnionAll2`.`C28`
FROM
    ((SELECT 
        `UnionAll1`.`C1`,
            `UnionAll1`.`Id` AS `C2`,
            `UnionAll1`.`Id1` AS `C3`,
            `UnionAll1`.`Razon_social` AS `C4`,
            `UnionAll1`.`Cuit` AS `C5`,
            `UnionAll1`.`Fecha_alta` AS `C6`,
            `UnionAll1`.`Id_base` AS `C7`,
            `UnionAll1`.`Id2` AS `C8`,
            `UnionAll1`.`Nombre` AS `C9`,
            `UnionAll1`.`Tipo` AS `C10`,
            `UnionAll1`.`Clase` AS `C11`,
            `UnionAll1`.`Id_codigo` AS `C12`,
            `UnionAll1`.`Id_accion` AS `C13`,
            `UnionAll1`.`Id_categoria` AS `C14`,
            `UnionAll1`.`C2` AS `C15`,
            `UnionAll1`.`C3` AS `C16`,
            `UnionAll1`.`C4` AS `C17`,
            `UnionAll1`.`C5` AS `C18`,
            `UnionAll1`.`C6` AS `C19`,
            `UnionAll1`.`C7` AS `C20`,
            `UnionAll1`.`C8` AS `C21`,
            `UnionAll1`.`C9` AS `C22`,
            `UnionAll1`.`C10` AS `C23`,
            `UnionAll1`.`C11` AS `C24`,
            `UnionAll1`.`C12` AS `C25`,
            `UnionAll1`.`C13` AS `C26`,
            `UnionAll1`.`C14` AS `C27`,
            `UnionAll1`.`C15` AS `C28`
    FROM
        ((SELECT 
        CASE
                WHEN (`Join1`.`id_estudio` IS NULL) THEN (NULL)
                ELSE (1)
            END AS `C1`,
            `Extent1`.`Id`,
            `Extent1`.`Id` AS `Id1`,
            `Extent1`.`Razon_social`,
            `Extent1`.`Cuit`,
            `Extent1`.`Fecha_alta`,
            `Extent1`.`Id_base`,
            `Join1`.`Id` AS `Id2`,
            `Join1`.`Nombre`,
            `Join1`.`Tipo`,
            `Join1`.`Clase`,
            `Join1`.`Id_codigo`,
            `Join1`.`Id_accion`,
            `Join1`.`Id_categoria`,
            NULL AS `C2`,
            NULL AS `C3`,
            NULL AS `C4`,
            NULL AS `C5`,
            NULL AS `C6`,
            NULL AS `C7`,
            NULL AS `C8`,
            NULL AS `C9`,
            NULL AS `C10`,
            NULL AS `C11`,
            NULL AS `C12`,
            NULL AS `C13`,
            NULL AS `C14`,
            NULL AS `C15`
    FROM
        `estudio` AS `Extent1`
    LEFT OUTER JOIN (SELECT 
        `Extent2`.`id_estudio`,
            `Extent2`.`id_resultado`,
            `Extent3`.`Id`,
            `Extent3`.`Nombre`,
            `Extent3`.`Tipo`,
            `Extent3`.`Clase`,
            `Extent3`.`Id_codigo`,
            `Extent3`.`Id_accion`,
            `Extent3`.`Id_categoria`
    FROM
        `estudio_resultado_estudio` AS `Extent2`
    INNER JOIN `estudio_resultado` AS `Extent3` ON `Extent3`.`Id` = `Extent2`.`id_resultado`) AS `Join1` ON `Extent1`.`Id` = `Join1`.`id_estudio`
    WHERE
        1 = `Extent1`.`Id`) UNION ALL (SELECT 
        2 AS `C1`,
            `Extent4`.`Id`,
            `Extent4`.`Id` AS `Id1`,
            `Extent4`.`Razon_social`,
            `Extent4`.`Cuit`,
            `Extent4`.`Fecha_alta`,
            `Extent4`.`Id_base`,
            NULL AS `C2`,
            NULL AS `C3`,
            NULL AS `C4`,
            NULL AS `C5`,
            NULL AS `C6`,
            NULL AS `C7`,
            NULL AS `C8`,
            `Join3`.`Id` AS `Id2`,
            `Join3`.`Nombre`,
            `Join3`.`Contacto`,
            `Join3`.`No_contacto_required`,
            `Join3`.`Sistema`,
            `Join3`.`Puntaje`,
            `Join3`.`Color`,
            NULL AS `C9`,
            NULL AS `C10`,
            NULL AS `C11`,
            NULL AS `C12`,
            NULL AS `C13`,
            NULL AS `C14`,
            NULL AS `C15`
    FROM
        `estudio` AS `Extent4`
    INNER JOIN (SELECT 
        `Extent5`.`id_estudio`,
            `Extent5`.`id_contacto`,
            `Extent6`.`Id`,
            `Extent6`.`Nombre`,
            `Extent6`.`Contacto`,
            `Extent6`.`No_contacto_required`,
            `Extent6`.`Sistema`,
            `Extent6`.`Puntaje`,
            `Extent6`.`Color`
    FROM
        `estudio_contacto_estudio` AS `Extent5`
    INNER JOIN `estudio_contacto` AS `Extent6` ON `Extent6`.`Id` = `Extent5`.`id_contacto`) AS `Join3` ON `Extent4`.`Id` = `Join3`.`id_estudio`
    WHERE
        1 = `Extent4`.`Id`)) AS `UnionAll1`) UNION ALL (SELECT 
        3 AS `C1`,
            `Extent7`.`Id`,
            `Extent7`.`Id` AS `Id1`,
            `Extent7`.`Razon_social`,
            `Extent7`.`Cuit`,
            `Extent7`.`Fecha_alta`,
            `Extent7`.`Id_base`,
            NULL AS `C2`,
            NULL AS `C3`,
            NULL AS `C4`,
            NULL AS `C5`,
            NULL AS `C6`,
            NULL AS `C7`,
            NULL AS `C8`,
            NULL AS `C9`,
            NULL AS `C10`,
            NULL AS `C11`,
            NULL AS `C12`,
            NULL AS `C13`,
            NULL AS `C14`,
            NULL AS `C15`,
            `Join5`.`Id` AS `Id2`,
            `Join5`.`Nombre`,
            `Join5`.`Elegible`,
            `Join5`.`Llamada`,
            `Join5`.`Plan`,
            `Join5`.`Llamada_saliente`,
            `Join5`.`Sistema`
    FROM
        `estudio` AS `Extent7`
    INNER JOIN (SELECT 
        `Extent8`.`id_estudio`,
            `Extent8`.`id_tipo_gestion`,
            `Extent9`.`Id`,
            `Extent9`.`Nombre`,
            `Extent9`.`Elegible`,
            `Extent9`.`Llamada`,
            `Extent9`.`Plan`,
            `Extent9`.`Llamada_saliente`,
            `Extent9`.`Sistema`
    FROM
        `estudio_tipo_gestion_estudio` AS `Extent8`
    INNER JOIN `estudio_tipo_gestion` AS `Extent9` ON `Extent9`.`Id` = `Extent8`.`id_tipo_gestion`) AS `Join5` ON `Extent7`.`Id` = `Join5`.`id_estudio`
    WHERE
        1 = `Extent7`.`Id`)) AS `UnionAll2`
ORDER BY `UnionAll2`.`C3` ASC , `UnionAll2`.`C1` ASC
[2 Apr 2015 7:40] Chiranjeevi Battula
Error message screenshot

Attachment: 76466.PNG (image/png, text), 85.48 KiB.

[22 Apr 2015 12:21] Wouter Dingemanse
How can we solve this?
[5 Jun 2015 15:13] Eskild D
I've run into this bug as well. Is there a workaround?

The strange thing is that it doesn't happen locally but on the web server it fails :/
[20 Jul 2015 12:41] Keymer Leon
Greetings

I am experiencing the same problem. You have found a solution for this problem?
[25 Nov 2015 11:03] Eskild D
This bug is a show stopper when using ASP.NET OData (v4) Controllers where you don't have direct control over the query. And it happens quite frequent... I noticed that it starts to fail when the query joins multiple nested entities.

So a query like this is more likely to not work, then work: 
/odata/...?$expand=Foo($expand=Bar($expand=Baz)),X($expand=Y($expand=Z))
[30 Nov 2015 5:50] Chiranjeevi Battula
Note : http://bugs.mysql.com/bug.php?id=79448 marked as duplicate of this one.
[2 Dec 2015 6:36] epep eppe
I think the severity of this bug should be increased as it basically forbids the usage of multiple includes.
[2 Dec 2015 7:44] Wouter Dingemanse
@epep eppe
Multiple includes work fine for me. Its only on certain conditions that it isnt working. I'm thinking when there's enums or booleans involved.

This works:
                .Include(s => s.Distribution)
                .Include(s => s.Category)
                .Include(s => s.Country)

While this doesnt:

                .Include(s => s.Distribution)                
                .Include(s => s.Distribution.SiteDistributions)
                .Include(s => s.Category)
                .Include(s => s.Country)
[8 Mar 2016 11:33] Wouter Dingemanse
Found the solution (at least where booleans are involved) here: http://stackoverflow.com/a/31534825/141243

I added this convention to make it work:

    public class BoolConvention : Convention
    {
        public BoolConvention()
        {
            Properties<bool>()
                .Configure(p => p.HasColumnType("bit"));
        }
    }
[1 Jul 2016 12:57] Chiranjeevi Battula
http://bugs.mysql.com/bug.php?id=68886 marked as duplicate of this one.
[28 Sep 2017 7:45] Wolfgang Jacques
Hello everyone,
in the meantime we are at .NET Connector 6.9.9 and the problem persists. Any chances of fixing?
[16 Oct 2017 14:31] Emanuel Gianico
Two years and the bug isn't fixed yet. Glad i moved to NHibernate.
[5 Dec 2017 23:29] anchit pancholi
i am not finding any work around for slimier issue, it is going to be fix in next version (7.x or 8.x)?
[19 Feb 2018 8:31] Wouter Dingemanse
I stopped using MySql, but for anyone coming here I would advise using this: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql

I didnt test it, so if this helps you please confirm here, so everyone can benefit.
[6 Nov 2018 0:38] Greg Bennett
I'm still getting a similar result. Is this fixed or is there a workaround?
[21 May 10:44] Manikandan Nagarajan
Any update on this issue. I still face this issue with the following combination,

MySql.Data - 6.10.8
EntityFramework - 6.2.0