ParentModel has the following scopes
"getValidatedEntries" => array(
"condition" = "valid = 1",
)
ChildModel belongs to ParentModel
I'm trying to use the scope like this:
$validChildModels = $childModel(array( 'with' => array( 'parentModel' => array( 'scopes' => array( 'getValidatedEntries', ), ), ), ));
Doing it this way, I end up losing parentModel for some reason ($validChildModel->parentModel becomes null)
But if I run the code without using the scope like this
$validChildModels = $childModel(array( 'with' => array( 'parentModel' => array( 'condition' = 'valid = 1', ), ), ));
it works fine. Any idea what I'm doing wrong?

Help













