Is their anyway way to chech is a relation ship exist between two objects. Example:
Code:
$lecturer = new User($id);
$courses = new Course();
foreach($courses as $course){
//if $lecturer is related to this course then do sommin
}
Thanks in advance.[/quote]
I just need to ask, what is the ultimate goal you are seeking.
(A) To know that they are related
or
(B) To ack upon "lecturer" or "courses" if determined to be related.
My initial opinion would be to say (A) is not possible, and that you would need to use "where_related($lecturer)" (or $lecturer->courses) as designed.