Closed JamesW-Bede closed 9 years ago
Hi James, thanks for reporting this issue; the current behavior of the driver is to replicate the type used to transport the data from the server, when the generic getValue API is used. I have filed bug in our internal tracking system to have it fixed.
Thanks, Alberto
Hi there, We are trialling NuoDB and have run across an issue with the types the NuoDb Connector is returning.
Lets say we have a table with a single field
ID
and that its type isbigint
.When we query the db for a row with
ID = 1000000000000
then as expected the Reader returns an object of Int64 (long).However when we query for a row with
ID = 1
the reader returns an Int32 (int).The following c# exemplifies the issue:
In my experience of ADO .net connectors (which I will admit is not much) the type of the object returned from the reader is not determined by the size but rather type of the field in the db..
So for example if I was to switch to the MySql connector I would see:
Without this consistency using Micro ORMs like Dapper.Net seems impossible, as they expect all rows to be uniform.
I have reviewed the Connector source however cant see where this issue comes from, I am starting to think this may be down to what NuoDB itself is returning to the driver?