Search code examples
ormcoldfusioncoldfusion-9

Orm error on tinyint


I have the following mapping:

<cfcomponent persistent="true" cacheuse="nonstrict-read-write"> 
    <cfproperty name="sourcetypeid" fieldtype="id" generator="identity"> 
    ...

The data field is:

CREATE TABLE [dbo].[SourceType](
    [SourceTypeID] [tinyint] IDENTITY(1,1) NOT NULL,
    ...

I get the following error when I try to commit changes

unrecognized id type : byte -> java.lang.Byte 

Solution

  • According to the documentation, byte is not a supported ormtype. The closest would be short.

    Can you try this?

    <cfproperty name="sourcetypeid" 
           fieldtype="id" 
           ormtype="short"  
           generator="identity">