tinyint mapping

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
dilbert
Posts: 68
Joined: Tue 28 Apr 2009 10:11

tinyint mapping

Post by dilbert » Fri 11 Mar 2011 13:09

I just want to ask if it is convenient to map TINYINT (in Mysql) to System.Byte by default.

TINYINT can contain negative vaules and Byte is usigned in C# (0-255). So, the following exception is raised in such cases:

Code: Select all

MESSAGE: Value was either too large or too small for an unsigned byte.
STACKTRACE:    at System.Byte.Parse(String s, NumberStyles style, NumberFormatInfo info)
   at Devart.Common.ap.ar(Byte[] A_0, Int32 A_1, Int32 A_2)
   at lambda_method(ExecutionScope , b )
   at Devart.Data.Linq.Provider.ObjectReader`1.g()
...

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Fri 11 Mar 2011 17:16

Thank you for the request, we've changed the default mapping for signed TinyInt to System.SByte. We will post here when the build with this change is available.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Thu 24 Mar 2011 14:44

We have released the new 6.10.126 build of dotConnect for MySQL where this issue is fixed. The new build can be downloaded from
http://www.devart.com/dotconnect/mysql/download.html
(the trial version) or from Registered Users' Area (for users with active subscription only):
http://secure.devart.com/

For more information about the fixes and improvements available in dotConnect for MySQL 6.10.126, please refer to
http://www.devart.com/forums/viewtopic.php?t=20585

Miros
Posts: 45
Joined: Thu 20 Jan 2011 10:12
Contact:

Post by Miros » Fri 10 Jun 2011 09:18

StanislavK wrote:We have released the new 6.10.126 build of dotConnect for MySQL where this issue is fixed. The new build can be downloaded from
http://www.devart.com/dotconnect/mysql/download.html
(the trial version) or from Registered Users' Area (for users with active subscription only):
http://secure.devart.com/

For more information about the fixes and improvements available in dotConnect for MySQL 6.10.126, please refer to
http://www.devart.com/forums/viewtopic.php?t=20585
Hi there, it seems that this error is back in dotConnect for MySQL Pro v. 6.30.165 - I am getting this error with records having Tinyint = -1.

Post Reply