I have this entities:
class Category {
// normal field database
$description;
// hasMany Operations ArrayCollection
$operations;
// this attribute don't field in database, this increase value when
attribute operation is setted
$total;
public function addOperation($operation) {
$total += $operation->getValue();
$operations[] = $operation;
}
}
class Operation {
$description;
$value;
$category;
}
When i execute DQL "SELECT c FROM Category", and execute
$query->getResult(Doctrine\ORM\Query::HYDRATE_ARRAY);
this attribute $total is not correct value, i understand, but i will like
know if exist any way for i intercept and observe this attribute and
increase your value.
i have try magic methods like: __set, __call, but dont is called
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.