Hi,
I'm starting at RedbeanPHP and I'm having this situation.
I created a bean named $user.
My user can get a lot of $skills.
So my code is something like this:
$user = R::dispense('user');
$user->name = "user name";
$skill = R::dispense('skill');
$skill->name = 'skill name';
$user->ownSkillsList[] = $skill;
$id = R::store($user);
Until this moment, everything is ok.
When I tried to load: $user = R::load('user', $id);
My list isn't at $user.
I tried to do something like that:
$user->ownSkillsList = R::findAll('userskills', ' user_id = ? ', [ $user->id ] );
My list becomes OK, but when I'm receiving at my javascript like a json object, the list cames only with the Plain Object, with the respective id.
What am I doing wrong?
Thanks a lot.