New Posts New Posts RSS Feed: IdGenerator doesn't work with Tinyint columns
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

IdGenerator doesn't work with Tinyint columns

 Post Reply Post Reply
Author
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Topic: IdGenerator doesn't work with Tinyint columns
    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.

Back to Top
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down