Quote:- Did you save the ‘student’ object first?
- Have you looked through the troubleshooting section in the docs?
- Have you looked at the queries being generated to see what’s happening?
- Have you double-checked the names of your fields?
EUREKA!!
I cant believe what the problem was, well at least i think its the problem. I realised that when i had:
Code:
if(!$guardian->save_student($user))
foreach ($guardian->error->all as $errors) {
echo $errors;
}
//........
The student_id field on the $guardian object was being populated which was sort of backwards so i changed the code to:
Code:
if($user->save_guardian($guardian))
foreach ($user->error->all as $errors) {
echo $errors;
}