Print Page | Close Window

IdGenerator doesn't work with Tinyint columns

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=205
Printed Date: 05-May-2025 at 4:41am


Topic: IdGenerator doesn't work with Tinyint columns
Posted By: Customer
Subject: IdGenerator doesn't work with Tinyint columns
Date Posted: 12-Jul-2007 at 3:38pm

If I have a tinyint in the PK field, and even if the field is autoincrement, an exception is thrown when the newly created entity is added to the persistence manager.  I forget what the exception name was, but I could reproduce it.

I also found that when I changed the PK/autoincrement field to a smallint, the problem went away.




Replies:
Posted By: IdeaBlade
Date Posted: 12-Jul-2007 at 3:39pm
This is a limitation of our implementation of IdGenerator for numeric and identity columns.  We tried to make these generators as flexible as possible so that they could be used with a variety of column sizes, but it’s quite likely that we forgot about the case of tinyint.  I’ll add a low priority Feature Request for this.  If you are using our implementation of the NumericIdGenerator, you could probably add this feature on your own.



Print Page | Close Window