asprin
Active member
Just trying to wrap my head around a basic concept in XF2. What's the difference between (1) and (2)?
And does the meaning of
PHP:
//#1
$structure->relations['Bars'] = [
'entity' => 'ABC\DEF:Bar',
'type' => self::TO_MANY,
'conditions' => ['foo_id', '=', '$bar_id'],
'primary' => true
];
//#2
$structure->relations['Bars'] = [
'entity' => 'ABC\DEF:Bar',
'type' => self::TO_MANY,
'conditions' => ['foo_id', '=', '$bar_id'],
'primary' => false
];
And does the meaning of
primary=>true
change if used on a SELF::TO_ONE
relation or does it behave the same as self::TO_MANY