我有一个Users
实体在几个不同的应用程序中重复,它只是从application.cfc
. 我正在尝试将应用程序的某些部分合并到一个位置,因此我需要使用不同的数据源访问实体,因为一个应用程序将访问所有部分。
component accessors=true persistent=true table="Users" entityName="Users" extends="common.model.BaseActiveEntity"{...}
根据我在网上找到的内容,我应该能够从虚拟实体服务中为该实体设置数据源,如下所示:
Component singleton=false accessors=true autowire=false Datasource="DB2" extends="common.model.BaseVirtualEntityService"{
public testUser function init(){
super.init(argumentCollection=arguments,entityName="Users");
return this;
}
}
但是当我将实体转储到页面以查看它包含的内容时,它已默认返回到application.cfc
. 我试图弄清楚是否有办法将数据源强制到实体。有任何想法吗?