I have a DataObject called Applicant and it $has_one Member (this is the SilverStripe Member class).
private static $has_one = array (
'MemberApplicant' => 'Member'
);
When a member is logged in and visits the ApplicationPage I want to be able to populate the form based on the members Applicant data.
I can make this work but I feel like I should be able to access the data easier.
Here is what I do:
$memberID = Member::currentUserID();
$applicant = Applicant::get()->filter('MemberApplicantID', $memberID)->first();
$form->loadDataFrom($applicant);
Shouldn't I be able to instantiate a Member and then call its relative $MemberApplicant?