我想加入两个单独的查询。并显示来自他们的信息。第一个查询是来自Canada的公司,第二个查询是名称为Incremento的公司。所以我需要运行单独的查询并加入结果信息。
我的架构是:
<entity name="firm" dataSource="jdbc" pk="id"
query="select * from firm"
deltaImportQuery="select * from firm where id='${dih.delta.id}'"
deltaQuery="select id from firm where upd_date > '${dih.last_index_time}'">
<field column="id" name="id"/>
<field column="ADDRESS" name="address"/>
<field column="EMPLOYEE" name="employee"/>
<field column="NAME" name="name"/>
<field column="VILLAGE" name="village"/>
<field column="ZIPCODE" name="zipcode"/>
<field column="PLACE" name="place"/>
<entity name="country" pk="id"
query="select country from country where id='${firm.country}'"
deltaQuery="select id from country where upd_date > '${dih.last_index_time}'"
parentDeltaQuery="select id from firm where country=${country.id}">
<field column="country" name="countryName"/>
</entity>
</entity>
怎么做 ???