Jaxel
Well-known member
I have a relation in my
If I do:
The primary key of this relation is
However, when I do
How do I fix this?
`
$package
:
Code:
'Pages' => [
'entity' => 'EWR\Scoreboard:Page',
'type' => self::TO_MANY,
'conditions' => 'package_id',
'order' => 'page_order',
],
If I do:
\XF::dump($package->Pages);
, I properly get all the pages within this package.The primary key of this relation is
page_id
; but I want the results keyed by a different value... so I change the relation to:
Code:
'Pages' => [
'entity' => 'EWR\Scoreboard:Page',
'type' => self::TO_MANY,
'conditions' => 'package_id',
'order' => 'page_order',
'key' => 'page_key',
],
However, when I do
\XF::dump($package->Pages);
, I don't get any entities, and the finder collection has #populated: false
.How do I fix this?
`