You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Marek Šabo <ms...@buk.cvut.cz> on 2010/04/11 19:40:16 UTC
Optimistic Locking problem
Hi all,
I would like to ask a question abou OL, I'm using cayenne filter along
with wicket and I set OL through cayenne modeller and double-checked in
xml (lock-type="optimistic" in obj-entity). But when I log in in two
different browser and try to update users information I don't get ol
exception and log says:
UPDATE UserInfo SET room = ? WHERE userId = ?
2010-04-11 19:37:43,166 INFO - QueryLogger - [bind:
1->room:421, 2->userId:21]
so there are missing where clauses which should prevent the update.
Is there something that needs to be configured in order for it to work,
or is this a bug?
TIA
--
Marek Šabo
Re: Optimistic Locking problem
Posted by Marek Šabo <ms...@buk.cvut.cz>.
Hi,
thanks, I already realized I didn't, I expected that it automatically
uses all fields, but this is better of course.
Hope it'll work now.
Regards,
--
Marek Šabo
On 04/11/2010 09:07 PM, Bryan Lewis wrote:
> Did you select any attribute to be "Used for Locking" in the modeler? In
> the Attributes view.
>
>
> On Sun, Apr 11, 2010 at 1:40 PM, Marek Šabo <ms...@buk.cvut.cz> wrote:
>
>
>> Hi all,
>>
>> I would like to ask a question abou OL, I'm using cayenne filter along
>> with wicket and I set OL through cayenne modeller and double-checked in
>> xml (lock-type="optimistic" in obj-entity). But when I log in in two
>> different browser and try to update users information I don't get ol
>> exception and log says:
>>
>> UPDATE UserInfo SET room = ? WHERE userId = ?
>> 2010-04-11 19:37:43,166 INFO - QueryLogger - [bind:
>> 1->room:421, 2->userId:21]
>>
>> so there are missing where clauses which should prevent the update.
>> Is there something that needs to be configured in order for it to work,
>> or is this a bug?
>>
>> TIA
>>
>> --
>> Marek Šabo
>>
>>
>>
>>
>
Re: Optimistic Locking problem
Posted by Bryan Lewis <jb...@gmail.com>.
Did you select any attribute to be "Used for Locking" in the modeler? In
the Attributes view.
On Sun, Apr 11, 2010 at 1:40 PM, Marek Šabo <ms...@buk.cvut.cz> wrote:
> Hi all,
>
> I would like to ask a question abou OL, I'm using cayenne filter along
> with wicket and I set OL through cayenne modeller and double-checked in
> xml (lock-type="optimistic" in obj-entity). But when I log in in two
> different browser and try to update users information I don't get ol
> exception and log says:
>
> UPDATE UserInfo SET room = ? WHERE userId = ?
> 2010-04-11 19:37:43,166 INFO - QueryLogger - [bind:
> 1->room:421, 2->userId:21]
>
> so there are missing where clauses which should prevent the update.
> Is there something that needs to be configured in order for it to work,
> or is this a bug?
>
> TIA
>
> --
> Marek Šabo
>
>
>