Liferay中實現多對多的關係
阿新 • • 發佈:2019-01-01
Liferay Service Builder Many to Many Relation in Plugin Portlet
參考URL:http://www.liferaysavvy.com/2014/01/liferay-service-builder-many-to-many_12.html
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.1.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_1_0.dtd"> <service-builder package-path="com.meera.db"> <author>E5410</author> <namespace>meera</namespace> <entity name="Student" local-service="true" remote-service="true" cache-enabled="false"> <column name="studentId" type="long" primary="true" /> <column name="studentName" type="String" /> <column name="studentPlace" type="String" /> <column name="studentCollege" type="String" /> <column name="courses" type="Collection" entity="Course" mapping-table="Students_Courses"/> </entity> <entity name="Course" local-service="true" remote-service="true" cache-enabled="false"> <column name="courseId" type="long" primary="true" /> <column name="courseName" type="String" /> <column name="courseGroup" type="String" /> <column name="students" type="Collection" entity="Student" mapping-table="Students_Courses" /> </entity> </service-builder>