Situation:
I have 3 tables: Student, Address, StudentAddressLink As follows Note* not EXACT yaml file but you get the idea
Student:
column:
id: blah blah
name: blah blah
Address:
column:
id: ~
street: ~
StudentAddressLink:
column:
id:~
student_id: ~
address_id: ~
relations:
Student:
local: student_id
foreign: id
Address:
local: address_id
foreign: id
From the Student object I want to get the related "Address Street" currently I have to do this:
foreach($student->StudentAddressLink as $address)
{
echo $address->getStreet();
}
This works...but I though there was a way to do something that makes the link table transparent, something magical like this:
foreach($student->Addresss as $address)
{
echo $address->getStreet();
}
Any direction would be great!