I know the question might be confusing,any ways I will explain it.
Basically I have two tables. Student and Course where studentid and courseid are their corresponding primary keys.
In the Student table I have two attributes courseid and courseidbackup both are key(FK) to the course table. This is the service xml I am using, but it shows build unsuccessful.
What am I missing here? How to create service xml to achieve this ?
<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>