tinyint上的orm错误

时间:2014-01-28 22:19:51

标签: orm coldfusion coldfusion-9

我有以下映射:

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

数据字段为:

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

我尝试提交更改时出现以下错误

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

1 个答案:

答案 0 :(得分:2)

根据the documentation,byte不是受支持的ormtype。最接近的是short

你能试试吗?

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