MySql Binary as Guid = yes

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
SquishyZA
Posts: 6
Joined: Tue 30 Jun 2020 15:34

MySql Binary as Guid = yes

Post by SquishyZA » Tue 30 Jun 2020 15:46

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

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: MySql Binary as Guid = yes

Post by Shalex » Mon 13 Jul 2020 07:29

We will investigate the question and notify you about the result.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: MySql Binary as Guid = yes

Post by Shalex » Fri 17 Jul 2020 08:27

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.

Post Reply