2013-03-05 176 views
1

我有一套ORM对象,可以在我的CF9 & 10本地工作站和我的一个CF9服务器上工作(我们会说INT & EXT),但不是其他的。一切似乎设置正确,但当我调用prc.app.save(),应用程序实体的一个实例时,我得到以下消息。ORM映射错误

Detail: Either the mapping for this component is missing or the application must be restarted to generate the mapping. 
Message Mapping for component dot.path.to.model.app not found. 

他们系统管理员说,两台服务器A & B的设置完全相同。

这是在model/app.cfc文件中导致问题的属性。

component entityName="app" extends="coldbox.system.orm.hibernate.ActiveEntity" table="real_table_name" schema="real_schema" persistent="true"{  
.... 
property name="applicants" 
    fieldtype="one-to-many" 
    column="app_id" 
    cfc="applicant" 
    fkcolumn="app_id" type="array" 
    singularname="applicant" 
    lazy="false" 
    cascade="save-update" 
    orderby="app_num"; 

模型/ applicant.cfc看起来像这样

component entityName="applicant" extends="coldbox.system.orm.hibernate.ActiveEntity" table="real_table_name" schema="real_schema" persistent="true"{ 
property name="applicant_id" 
    fieldtype="id" 
    generator="sequence" 
    sequence="real_sequence"; 
property name="app_id" ormtype="integer"; 
property name="app_num" ormtype="integer"; 

我相信我的ORM设置设置正确。

<cfset this.ormSettings = { 
     cflocation    = "model", 
     logSQL     = true, 
     flushAtRequestEnd  = false, 
     autoManageSession  = false, 
     eventHandling   = true, 
     eventHandler   = "coldbox.system.orm.hibernate.WBEventHandler" 
     }> 

这是在ColdBox 3.5框架内。

我正在寻找任何建议来帮助我找出这个错误。

谢谢。

+1

听起来像映射没有正确设置。你是在CF管理员还是在application.cfc中设置它们? – 2013-03-05 19:03:58

+0

错字?它的'cfclocation' – Henry 2013-03-05 19:08:54

+0

感谢亨利我没有见过那个。 – Aaron 2013-03-05 20:57:10

回答

1

好的。现在我觉得很愚蠢。 orderby =“app_num”属性一些如何在app_id属性中设置。它是申请实体中的专栏而不是应用实体。