Luca, I used 2.0.6. Did you read my comments?
Dňa utorok, 14. apríla 2015 18:33:20 UTC+12 l.garulli napísal(-a): > > Which version are you using? I tried 2.0.7-SNAPSHOT and my query worked. > Il 14/Apr/2015 01:53, "Zlatko Fedor" <[email protected] <javascript:>> ha > scritto: > >> Luca, >> >> yes I tried. It is not working. >> And it can not working because as I said fields title and options have a >> type STRING and I have a schema for that. >> And more fun is that this query: UPDATE #17:0 SET title = {"name":"adam"} >> will save "{name=adam}". OMG >> Anyway, maybe your are confused that I am tring to save object as string. >> Here is a different example: >> >> UPDATE #17:0 SET title = "He said \"hello\".", paragraphs= [{ "@type": >> "document", "@class": "BlogAParagraphs", "options": "He said \"hello\"."}] >> RETURN after @this >> >> I will get: title = 'He said "hello".' which is OK but for >> paragraphs.0.options = ''He said \\\"hello\\\".' which is WRONG >> >> Thanks >> >> Dňa utorok, 14. apríla 2015 10:51:32 UTC+12 l.garulli napísal(-a): >>> >>> Zlatko, >>> Have you tried my query? >>> >>> Lvc@ >>> >>> >>> On 14 April 2015 at 00:22, Zlatko Fedor <[email protected]> wrote: >>> >>>> It was example because fields options and title have a type String. I >>>> need to save character " but orientdb will always add \\ for embedded >>>> documents. In another words if someone will save character " in next >>>> refresh of the page he will see \" instead ". Can you confirm? Is it bug >>>> or >>>> feature of the orientdb >>>> On Apr 14, 2015 02:18, "l.garulli" <[email protected]> wrote: >>>> >>>>> Hi Zlatko, >>>>> Why did you passed everything as string? Use this: >>>>> >>>>> UPDATE #9:0 SET title = {"name":"adam"}, paragraphs= [{ "@class": >>>>> "BlogAParagraphs", "options": {"name":"adam"}}] RETURN after @this >>>>> >>>>> Lvc@ >>>>> >>>>> >>>>> On Sunday, April 12, 2015 at 3:09:22 PM UTC+2, Zlatko Fedor wrote: >>>>>> >>>>>> I used query (orientdb version 2.0.6): >>>>>> UPDATE #17:0 SET title = "{\"name\":\"adam\"}", paragraphs= [{ >>>>>> "@type": "document", "@class": "BlogAParagraphs", "options": >>>>>> "{\"name\":\"adam\"}"}] RETURN after @this >>>>>> >>>>>> >>>>>> Orientdb returns with binnary protocol: >>>>>> >>>>>> Blog@user:#17:0,title:"{\"name\":\"adam\"}",paragraphs:[(Blo >>>>>> gAParagraphs@@type:"document",options:"{\\\"name\\\":\\\"ada >>>>>> m\\\"}")],@type:"document" >>>>>> >>>>>> for Original object: >>>>>> >>>>>> { >>>>>> title: "{\"name\":\"adam\"}", >>>>>> paragraphs: [{ >>>>>> options: "{\"name\":\"adam\"}" >>>>>> }] >>>>>> } >>>>>> >>>>>> FYI: title and options is same and paragraphs is embedded list of >>>>>> objects. >>>>>> >>>>>> *Why is there an one more escape ?* >>>>>> >>>>>> There is another question about same issue >>>>>> <https://groups.google.com/forum/#!searchin/orient-database/escape%7Csort:date/orient-database/crAmANhfkGU/d_doo_oVdfcJ>. >>>>>> >>>>>> I have a really bad feeling about orientdb right now. Because I spent >>>>>> one >>>>>> month with it and there is a lot of "small" but serious bugs. >>>>>> In my opinion *it is really not ready for production use*. >>>>>> >>>>> -- >>>>> >>>>> --- >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "OrientDB" group. >>>>> To unsubscribe from this topic, visit https://groups.google.com/d/ >>>>> topic/orient-database/2zHHMZFxAeg/unsubscribe. >>>>> To unsubscribe from this group and all its topics, 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]. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> Best Regards, >>> >>> Luca Garulli >>> CEO at Orient Technologies LTD >>> the Company behind OrientDB >>> http://about.me/luca.garulli >>> >>> -- >> >> --- >> 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.
