使用Coldfusion 10 ORM时出现不支持的数据转换错误

使用Coldfusion 10 ORM时出现不支持的数据转换错误,orm,coldfusion,coldfusion-10,Orm,Coldfusion,Coldfusion 10,尝试使用ORM加载对象时,我收到以下错误: [Macromedia][SQLServer JDBC驱动程序]不支持的数据转换 代码: 这件事让我困惑不解。我弄明白了。显然,SQLServerJDBC驱动程序()中有一个bug。如果datetime字段中有空值,则在尝试检索数据时会发生错误 我以为问题字段是我的id字段,但实际上是日期时间字段。由于我仅将此字段用作时间戳,因此我将数据类型更改为varchar字段,错误消失。我已修改该条目以包含cfc和我的会话值。谢谢你的帮助,对不起。我无法正确显示

尝试使用ORM加载对象时,我收到以下错误:

[Macromedia][SQLServer JDBC驱动程序]不支持的数据转换

代码:


这件事让我困惑不解。

我弄明白了。显然,SQLServerJDBC驱动程序()中有一个bug。如果datetime字段中有空值,则在尝试检索数据时会发生错误


我以为问题字段是我的id字段,但实际上是日期时间字段。由于我仅将此字段用作时间戳,因此我将数据类型更改为varchar字段,错误消失。

我已修改该条目以包含cfc和我的会话值。谢谢你的帮助,对不起。我无法正确显示代码,但我找到了它。为了实验起见,硬代码
1001
在那里。如果这行得通,就这样做:我刚试过。同样的错误。我甚至试着放下桌子,重新做了一次
<cfscript>
    order = entityLoadByPK('orders',session.orderid);
</cfscript>
component  output="false" persistent="true" table="orders" accessors="true"
{ 
    property name="o_id"        column="o_id"       getter="true"   setter="false"  fieldtype="id"  generator="identity"; 
    property name="o_cust_id"       column="o_cust_id"      getter="true"   setter="true" type="numeric"    sqltype="cf_sql_integer"; 
    property name="o_cart_id"       column="o_cart_id"      getter="true"   setter="true" type="numeric"    sqltype="cf_sql_integer"; 
    property name="o_item_count"        column="o_item_count"       getter="true"   setter="true" type="numeric"    sqltype="cf_sql_integer"; 
    property name="o_timestamp"     column="o_timestamp"        getter="true"   setter="true" ORMtype="date"    sqltype="cf_sql_timestamp"; 
    property name="o_subtotal"      column="o_subtotal"     getter="true"   setter="true" ORMtype="date"    sqltype=""; 
    property name="o_status"        column="o_status"       getter="true"   setter="true" type="string" sqltype="cf_sql_varchar"; 
    property name="o_tax_rate"      column="o_tax_rate"     getter="true"   setter="true" type="string" sqltype=""; 
    property name="o_tax_cost"      column="o_tax_cost"     getter="true"   setter="true" type="string" sqltype=""; 
    property name="o_promo_code"        column="o_promo_code"       getter="true"   setter="true" type="string" sqltype="cf_sql_varchar"; 
    property name="o_promo_value"       column="o_promo_value"      getter="true"   setter="true" type="string" sqltype=""; 
    property name="o_total"     column="o_total"        getter="true"   setter="true" type="string" sqltype=""; 
    property name="o_completed"     column="o_completed"        getter="true"   setter="true" type="char"   sqltype="cf_sql_bit"; 
    property name="o_completed_date"        column="o_completed_date"       getter="true"   setter="true" type="char"   sqltype="";

    public function init(){
        return this;
    }
}