I'm having trouble hydrating my result from the database. I run the following
$tags = $this->modelsManager->executeQuery("
SELECT namespace.*, predicate.*, value.*
FROM ...\Models\Tags\NamespaceTag AS namespace
JOIN ...\Models\Tags\PredicateTag AS predicate
JOIN ...\Models\Tags\ValueTag AS value
ORDER BY namespace.part, predicate.part, value.part");
$results = $tags->setHydrateMode(Resultset::TYPE_RESULT_FULL);
The models all have their hasMany
and belongsTo
's set.
However I can't seem to access belongsTo
aliases.
Trying this results in an Model PredicateTag could not be loaded
$result->namespace->predicates //predicates is a set alias
However I can access $result->predicate
but I would a $result->namespace->predicates->values
structure
Is it possible to return the result set fully hydrated just like Doctrine?