ColdFusion 9 Hibernate統合を使用してエントリエンティティに外部キー値を挿入しようとすると、このエラーが発生することを誰かが知っていますか?
java.lang.ClassCastException:java.lang.Stringをcoldfusion.cfc.CFCBeanProxyにキャストできません
根本原因:org.hibernate.HibernateException:java.lang.ClassCastException:java.lang.Stringをcoldfusion.cfc.CFCBeanProxyにキャストできません
以下は、エンティティオブジェクト、次にユーザーオブジェクトのコードです。
これに何か問題がありますか?
entry.cfc
/**
* Entries Object
*/
component output="false" persistent="true"{
property name="entry_id" fieldType="id" generator="uuid";
property name="entryBody" ormType="text";
property name="title" notnull="true" type="string";
property name="time" fieldtype="timestamp";
property name="isCompleted" ormType="boolean" dbdefault="0" default="false";
property name="userID" fieldtype="many-to-one" fkcolumn="userID" cfc="user";
Entry function init() output=false{
return this;
}
}
user.cfc
/**
* Users Object
*/
component output="false" persistent="true"{
property name="userID" fieldType="id" generator="uuid";
property name="firstName" notnull="true" type="string";
property name="lastName" notnull="true" type="string";
property name="password" notnull="true" type="string";
property name="userType" notnull="true" type="string";
//property name="entry" fieldtype="one-to-many" type="array" fkcolumn="userID" cfc="entry";
User function init() output=false{
return this;
}
}