Hi Jasper, thanks for your help.

I resolved my problem using JMS serialization, with annotations: @Groups
and @VirtualProperty.

references:
http://jmsyst.com/libs/serializer
http://jmsyst.com/libs/serializer/master/reference/annotations


2014-11-21 11:18 GMT-02:00 'Jasper N. Brouwer' via doctrine-user <
[email protected]>:

> Another option is to lazily calculate it:
>
>     class Category
>     {
>         private $total;
>
>         public function getTotal()
>         {
>             if ($this->total === null) {
>                 $this->total = // calucate it here
>             }
>
>             return $this->total;
>         }
>     }
>
> --
> Jasper N. Brouwer
> (@jaspernbrouwer)
>
>
> On 21 November 2014 at 12:16:43, [email protected] (
> [email protected]) wrote:
> > 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)
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "doctrine-user" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/doctrine-user/448rURYhJsg/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>

-- 
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