Adding a Column to a Many-to-Many Table Using Liferay
I would like to add a column to the association table using a builder service on 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>
I mean i need to add a column to entity1_entity2 table
Do you have any suggestions?
+3
source to share
1 answer
I think you would watch this tutorial (it broke into 3 parts):
- Part I: http://www.liferaysavvy.com/2014/01/liferay-service-builder-many-to-many.html
- Part II: http://www.liferaysavvy.com/2014/01/liferay-service-builder-many-to-many_12.html
- Part III: http://www.liferaysavvy.com/2014/01/liferay-service-builder-many-to-many_3547.html
Sincerely.
0
source to share