鏈接的存儲我有,我有employee
在ABC
庫 和XYZ
庫address_details
兩個表的要求。將數據插入到在ATG
employee
的一列有對address_details
的外鍵引用。
在這裏,我遇到的primaryKey
爲address_details
,並與primaryKey
參考我必須插入employee
我的數據。
所以我RDF是這樣的:
RDF 1:(Repository1:ABC
)
<item-descriptor name=」employee」 >
<table name=」employee」>
<property name=」empId」 data-type=」string」 column-name=」emp_id」
required=」true」/>
<property name=」address」 column-name=」address_id」 item-type=」address」
repository=」XYZ」 required=」true」/>
</table>
</item-descriptor>
RDF 2:(Repsitory2:XYZ
)
<item-descriptor name=」address」 >
<table name=」address_details」>
<property name=」addressId」 data-type=」string」 column-name=」address_id」/>
<property name=」streetName」 column-name=」street_name」 data-type=」string」/>
<property name=」city」 column-name=」city」 data-type=」string」 />
</table>
</item-descriptor>
我所有的存儲在表address_details
中的地址。我必須 地圖employee
到這些地址。
這我想這裏的方式獲取的RepostoryItem
Address
第一,然後設置的employee
財產型address
並將其添加到 表employee
。這工作。
但是我想在一個呼叫中單獨插入employee
數據?
關於如何使用RepositoryItem
或 MutableRepositoryItem
?
爲什麼你需要在一次通話中關聯?它的理由是,如果你想關聯這兩個,你必須先查找你想要關聯的項目,然後執行關聯。首先進行必要的查找並在找到適當的地址項目後更新員工項目沒有任何問題。 – chrisjleu