Implement Many to Many Relation in liferay development using service builder tool.
Liferay 6.2 +Tomcat 7.x+MySQL 5.1
The code will work for portal 6.2 version you can try for 6.1 too.
Download Liferay Many To Many Portlet from following location
You can find source and war file
Procedure for deploy portlet:
You can use war file and directly place in your portal deploy folder and test or you can also use source to deploy portlet.
Once portlet is deployed successfully you can see the portlet in sample category name as Many To Many.
How To use Portlet?
One portlet successfully deployed then portlet available in sample category.
Login as Liferay Admin and add portlet to any page.
Add some students in the database using Add Student Screen
Add some courses in database using Add course screen
Map Courses to Student from following screen
Map Students to course from following screen
Display students and his/her courses