Page 1 of 1

MySql Binary as Guid = yes

Posted: Tue 30 Jun 2020 15:46
by SquishyZA
It seems like if for DevArt.Data.MySql.EFCore that if you specify “Binary as Guid=yes” in the connection string that all BINARY(16) fields are assumed to be a Guid/UUID. Is there a way to convince EF that it is not a Guid? My definition of the offending property is:

[Column(TypeName=“BINARY(16)”)]
[Required]
Public byte[] Data {get; set;}

Depending on what I try I get different errors. The only way to make it work is to remove “Binary as Guid” from the connection string. But I really need to have binary Guid’s, so a way to make this work would be appreciated.

Thank you

Re: MySql Binary as Guid = yes

Posted: Mon 13 Jul 2020 07:29
by Shalex
We will investigate the question and notify you about the result.

Re: MySql Binary as Guid = yes

Posted: Fri 17 Jul 2020 08:27
by Shalex
The bug with reading the BINARY(16) column mapped to the byte[] class property, when "Binary As Guid=True;" is set in the connection string, in EF Core is fixed: viewtopic.php?f=2&t=41388.