Hello Liferay专家,
请帮我在Liferay中为以下场景创建service.xml
:
我有2张桌子
SystemUsed
systemUsedId long
name varchar
User_SystemUsed
userId long --> mapped to userId of User_ table
systemUsedId long --> mapped to systemUsedId of SystemUsed table.<br>
由于
答案 0 :(得分:1)
您可以按如下方式创建表格:
<entity name="SystemUsed" local-service="true" remote-service="false">
<column name="systemUsedId type="Long" />
<column name="name" type="String"/>
</entity>
<entity name="User_SystemUsed" local-service="true" remote-service="false">
<column name="systemUsedId" type="SystemUsed" entity="SystemUsed" mapping-key="systemUsedId" />
<column name="userId" type="User" entity="User_" mapping-key="userid" />
</entity>
我希望user_ table的映射正确...