使用Liferay将列添加到多对多表

时间:2014-12-18 09:17:10

标签: database liferay liferay-service-builder

我想在liferay上使用服务构建器向关联表添加一列!

<entity name="entity1" local-service="true" remote-service="false">

    <column name="entity1Id" type="long" primary="true" id-type="sequence"

        id-param="id_entity1_sequence"></column>

    <column name="name" type="String"></column>

    <column name="entity2s" type="Collection" mapping-table="entity1_entity2"
        entity="entity2"></column>

        <finder name="Name" return-type="entity1" unique="true">
        <finder-column name="name"></finder-column>

    </finder>

</entity>

<entity name="entity2" local-service="true" remote-service="false">

    <column name="entity2Id" type="long" primary="true" id-type="sequence"

        id-param="id_entity2_sequence"></column>

    <column name="header" type="String"></column>

    <column name="value" type="String"></column>

    <column name="entity1s" type="Collection" mapping-table="entity1_entity2"
        entity="entity1"></column>


</entity>

我的意思是我需要在entity1_entity2表中添加一列

你有什么建议吗?