1

您好 Liferay 专家,

service.xml请帮我在 Liferay 中为以下场景创建一个:

我有 2 张桌子

  1. SystemUsed

    systemUsedId long
    name varchar
    
  2. User_SystemUsed

    userId long        --> mapped to userId of User_ table
    systemUsedId long  --> mapped to  systemUsedId of SystemUsed table.<br>
    

谢谢

4

1 回答 1

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_ 表像这样正确映射......

于 2012-11-21T08:05:35.767 回答