質問が混乱を招く可能性があることは承知していますが、どのように説明しても構いません。
基本的に私は2つのテーブルを持っています。Student と Course 。ここで、studentid と courseid は対応する主キーです。
Student テーブルには、courseid と courseidbackup の 2 つの属性があり、どちらも course テーブルのキー (FK) です。これは私が使用しているサービス xml ですが、ビルドに失敗したと表示されます。
ここで何が欠けていますか?これを達成するためにサービスxmlを作成する方法は?
<service-builder package-path="com.students.db">
<author>bugs</author>
<namespace>students</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="coursesid" type="Collection" entity="Course" mapping-table="Students_Courses"/>
<column name="coursesidbackup" 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="courseDetails" type="String" />
<column name="students" type="Collection" entity="Student" mapping-table="Students_Courses" />
</entity>
</service-builder>