Does it mean that if I save() something without callInRecordLock (but i am
using plocal).
I will have to do it in a transaction?
If i am saving 2 fields, using
doc.fields("title", "texthere");
doc.fields("quantity", doc.fields("quantity") + 100 ) //atomic
doc.save()
I think it should be done in a transaction if concurrent modification
exception occured, i will have to reload the document and try saving again?
Is that the same behaviour to
Update MyTable INCREMENT quantity = 100, set title = "texthere" where @rid
= #21:1
On Friday, 3 January 2014 20:14:29 UTC+8, Andrey Lomakin wrote:
>
> Hi,
> What do you mean when write about atomic ? increment without concurrent
> modification exception ?
> If you use embedded storage you can lock records on storage level , and
> then release them.
>
> You may use
> com.orientechnologies.orient.core.storage.OStorage#callInRecordLock but
> please use it with care, to avoid deadlocks.
>
>
>
>
> On Fri, Jan 3, 2014 at 12:48 PM, Leng Sheng Hong
> <[email protected]<javascript:>
> > wrote:
>
>> How do you do a SQL like this in Java api for a document base DB?
>> Update MyTable INCREMENT quantity = 100 where @rid = #21:1
>>
>> I doubt setting fields and save() is actually atomic?
>> doc.fields("quantity", doc.fields("quantity") + 100 )
>> doc.save()
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> --
> Best regards,
> Andrey Lomakin.
>
> Orient Technologies
> the Company behind OrientDB
>
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.