Please read the documentation of SQLObject, especially for many to many relationships:
http://www.sqlobject.org/SQLObject.html#many-to-many-relationships
Diez