Using wrong type for blob
-------------------------
Key: DNET-876
URL: http://tracker.firebirdsql.org/browse/DNET-876
Project: .NET Data provider
Issue Type: Bug
Components: ADO.NET Provider
Affects Versions: 6.6.0.0
Environment: Asp.net core, microsoft.entityframeworkCore 2.2.4
Firebird 2.5
Reporter: Vladimir Karataev
Assignee: Jiri Cincura
I am using next data model:
[Table("table")]
public class Test
{
[Key][Required]
public long Id {get; set; }
[Column("raw_data")]
public byte[] raw_data {get; set; }
}
The column "raw_data" was descripted as: BLOB SUB_TYPE 1 SEGMENT SIZE 100 CHARACTER SET UTF8;
This is a BLOB.
I execute request of data from table through entity framework:
var data = db.Test.Find(id);
In window trace into visual studio i watch query:
SELECT "e"."ID", "e"."RAW_DATA" FROM "TABLE" AS "e" WHERE "e"."ID" = CAST(@__get_Item_0 AS BIGINT)
I have got exception in this place:
"Unable to cast object of type 'System.String' to type 'System.Byte[]'."
I suppose, provider should be using blob type for this column, but it using type of string for this column. May be it wrong behavior?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|