i'm up to the point in my addon where i need to bring in a relational data set. simple A.tableid -> B.id relationship.
I built out the relationship in $structure->relations = [] and now it's asking me for a getter. I don't know what to put in there.
I made this to simply get past the dead page load:
And the page loads but i'm not actually getting my join, as expected. Looking at other code, i can't figure out how to actually run the join.
Any advice?
my relation:
I also made the reverse relation on the other table.
I built out the relationship in $structure->relations = [] and now it's asking me for a getter. I don't know what to put in there.
I made this to simply get past the dead page load:
Code:
$structure->getters = [
'myfield' => true
];
public static function getMyfield()
{
return;
}
And the page loads but i'm not actually getting my join, as expected. Looking at other code, i can't figure out how to actually run the join.
Any advice?
my relation:
Code:
$structure->relations = [
'myfield' => [
'entity' => 'MyNS\MyMod:MyClass',
'type' => self::TO_ONE,
'conditions' => 'id',
'primary' => true
],
I also made the reverse relation on the other table.