누구나 ColdFusion 9 Hibernate 통합을 사용하여 엔트리 엔티티에 외래 키 값을 삽입하려고 할 때이 오류에 대해 알고 있습니까?오류 : java.lang.String을 coldfusion.cfc.CFCBeanProxy로 캐스팅 할 수 없습니다.
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;
}
}
/**
* 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;
}
}
출력 = "false"는 스크립트 스타일의 구성 요소에 실제로 필요하지 않습니다. – Henry