i used 2.1.rc2 Il giorno lunedì 8 giugno 2015 08:00:03 UTC+2, Luigi Dell'Aquila ha scritto: > > Hi Cristian > > I forgot to ask, which OrientDB version are you using? > 2.0.x does not support parameters as a target, while 2.1 RCx does > > Luigi > > > 2015-06-05 21:49 GMT+02:00 Cristian Lorenzetto <[email protected] > <javascript:>>: > >> in this block of code i found also another bug : >> >> " update ? ..... is nit working also without transaction ... dont replace >> the parameter >> >> >> Il giorno venerdì 5 giugno 2015 20:46:01 UTC+2, Cristian Lorenzetto ha >> scritto: >>> >>> using my test it seams to work partially. >>> >>> >>> List<ODocument> l=db.command(new OCommandSQL("select from >>> #28:0")).execute(); >>> db.begin(); >>> ODocument d=new ODocument("d"); >>> d.save(); >>> for(int i=0;i<10;i++) db.command(new OCommandSQL("update ? add >>> huge_list = "+i)).execute(d); >>> >>> >>> db.commit();<- throws exception >>> >>> Il giorno venerdì 5 giugno 2015 16:20:15 UTC+2, Cristian Lorenzetto ha >>> scritto: >>>> >>>> I wrote this code in previous versions .... anyway i ... write it also >>>> with actual soon so i can tell you a response .... >>>> I ll try also to add a nested transaction for check .... >>>> >>>> >>>> Il giorno venerdì 5 giugno 2015 15:29:40 UTC+2, Cristian Lorenzetto ha >>>> scritto: >>>>> >>>>> >>>>> I use java api .... The code is : >>>>> >>>>> ODocument a= new Document('A'); >>>>> a.save(); >>>>> ODocument b= db.load(b_id); >>>>> b.field('a',a); >>>>> b.save(); >>>>> db.commit();<- throws exception >>>>> >>>>> because b.field is saving a ORID with -1:10 .... >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Il giorno venerdì 5 giugno 2015 12:33:35 UTC+2, Luigi Dell'Aquila ha >>>>> scritto: >>>>>> >>>>>> Hi Cristian, >>>>>> >>>>>> if you use Java API this is transparent, you can just create the >>>>>> document and connect it to the rest of your data, OrientDB will replace >>>>>> temporary RIDs with final values at commit time >>>>>> >>>>>> Luigi >>>>>> >>>>>> >>>>>> 2015-06-05 12:32 GMT+02:00 Cristian Lorenzetto < >>>>>> [email protected]>: >>>>>> >>>>>>> I thought a solution for it in the case no other better solution >>>>>>> actually exists : >>>>>>> >>>>>>> when i create a document inside the transaction the id is valid but >>>>>>> point to a special cluster (transaction cluster) so i can >>>>>>> associate it in other odocuments ... without exceptions >>>>>>> when i make commit orientdb remap the associations with the right >>>>>>> new real id :) :) >>>>>>> >>>>>>> >>>>>>> >>>>>>> Il giorno venerdì 5 giugno 2015 12:19:35 UTC+2, Cristian Lorenzetto >>>>>>> ha scritto: >>>>>>>> >>>>>>>> in many cases i have a transaction and >>>>>>>> inside this transaction i have to create a new document and then to >>>>>>>> bind it to another document. >>>>>>>> >>>>>>>> when you create a new document, it has a invalid id until you make >>>>>>>> a commit. Is there other solutions? >>>>>>>> >>>>>>>> >>>>>>>> The solution acctually is : >>>>>>>> to make a commit after document creation and in case of rollback i >>>>>>>> have to remove document manually >>>>>>>> but is there other better solution ? >>>>>>>> for example if i create a nested transaction for the document >>>>>>>> creation i can have correct it ? >>>>>>>> >>>>>>> -- >>>>>>> >>>>>>> --- >>>>>>> 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/d/optout. >>>>>>> >>>>>> >>>>>> -- >> >> --- >> 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/d/optout. >> > >
-- --- 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/d/optout.
