i don't will like create a column, because that attribute can change accord 
with period the attribute $date.

class Operation {
    $description;
    $value;
    $date;
}

Ex: 

category: fuel in jun/2014 ($total = 100.00)
category: fuel in jul/2014 ($total = 150.00)

Em sexta-feira, 21 de novembro de 2014 08h32min43s UTC-2, 
[email protected] escreveu:
>
> 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.

Reply via email to