Bug #91141 EntityFrameworkCore migration
| Submitted: | 5 Jun 2018 1:12 | Modified: | 6 Jun 2018 8:32 |
|---|---|---|---|
| Reporter: | Nabil Hadjar | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | Connector / NET | Severity: | S3 (Non-critical) |
| Version: | OS: | Any | |
| Assigned to: | CPU Architecture: | Any |
[5 Jun 2018 1:12]
Nabil Hadjar
[5 Jun 2018 14:05]
Peter Laursen
The generated fails because no length is specified for the VARBINARY data column. .. Peter -- not a MySQL/Oracle person
[5 Jun 2018 14:06]
Peter Laursen
The generated *statement* fails ... .. I meant.
[5 Jun 2018 14:08]
Peter Laursen
.. and if the column really is supposed to store an image it should probably be a BLOB or even LONGBLOB ..
[5 Jun 2018 14:17]
Peter Laursen
This ressoruce may be useful https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql-server-data-type-mapping.... Here it says that .NET Framework type "byte[]" should be mapped to SqlDbType "varbinary". But I don't know about properties, limitations and range of a SQL Server varbinary and also not if SQL SErver requires data length specified for a varbinary. With MySQL I believe [LONG]BLOB would be better.
[5 Jun 2018 23:26]
Nabil Hadjar
thank you Peter Laursen for comments. for length specification and according to this document : http://www.entityframeworktutorial.net/code-first/maxlength-minlength-dataannotations-attr... - i have specified the data length, but i got the same problem - then i removed the "byte[]" type and replace it with "string" type, it has been mapped successfuly to varchar(length), where length is the length specified in the data annotation. so we have a problem with the varbinary and not length specification. for the LONGBLOB i agree with you, because it's the closest to varchar(max).
[6 Jun 2018 8:32]
Chiranjeevi Battula
Hello Nabil Hadjar, Thank you for the bug report. Verified based on internal discussion with dev's. Thanks, Chiranjeevi.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.056 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.