Hi David,

Which version of Doctrine are you using?

> My first fix was to load directly the version field after this call


What exactly do you mean by this?

-- 
Jasper N. Brouwer
(@jaspernbrouwer)


On 11 Jan 2014, at 19:46, [email protected] wrote:

> Hi all,
> 
> Thanks for Doctrine 2 project first of all i'm really happy to use it.
> Recently i find a strange behaviour and i wanted to get your feeling about it.
> Let me introduce my case :
> 
> I have a entity called 'userUnit' which have a @ORM\Version field named 
> 'version' to use lock on it describe there :
> 
> class UserUnit
> {
>     [...]
>     
>     /**
>      * @ORM\Version
>      * @ORM\Column(type="integer", name="version")
>      */
>     private $version;
> 
> [...]
> }
> 
> I'm looking for a record of this by calling findOneBy and when i receive it 
> and call getVersion() on it it returns me 0.
> In the database the version field was at 3.
> 
> When i look at the sql query i see that it load the version field correctly.
> 
> My first fix was to load directly the version field after this call and it 
> works but i don't really want to make an extra query for that.
> 
> Someone see what i make wrong or have the same issue ?
> 
> Thanks in advance guys,
> David.

-- 
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/groups/opt_out.

Reply via email to