That does the trick. Thank you Luca!
-ram.

On Friday, October 17, 2014 9:44:37 AM UTC-5, Lvc@ wrote:
>
> I think it's parsed as Map. Try this:
>
> CREATE VERTEX V CONTENT { "@class":"Account", "embedded": { "@type":"d", "x": 
> 100.341123124,"@fieldTypes": "x=d" } }
>
> Lvc@
>
>
> On 16 October 2014 12:59, Ram Rajamony <[email protected] <javascript:>> 
> wrote:
>
>> Hmm, when I try that, I end up with a new property called 
>> "fieldTypes=x=d" inside embedded.
>>
>> orientdb {db=appk0}> CREATE VERTEX V CONTENT { "@class":"Account", 
>> "embedded": { "x": 100.341123124,"@fieldTypes": "x=d" } }
>>
>> Created vertex 'V#9:4{embedded:{x=100.341125, @fieldTypes=x=d}} v1' in 
>> 0.275000 sec(s).
>>
>>
>> On Wednesday, October 15, 2014 6:17:26 PM UTC-5, Lvc@ wrote:
>>
>>> Hi Ram,
>>> you can put @fieldTypes field in the embedded object. Example:
>>>
>>> { "@class":"Account", "embedded": { "x": 100.341123124,"@fieldTypes": "x=d" 
>>> } }
>>>
>>>
>>> Lvc@
>>>
>>> ᐧ
>>>
>>> On 15 October 2014 16:40, Ram Rajamony <[email protected]> wrote:
>>>
>>>> OrientDB supports the notion of typed JSON through the "@fieldTypes" 
>>>> property. There is some documentation here: 
>>>> http://www.orientechnologies.com/docs/last/orientdb.wiki/
>>>> OrientDB-REST.html#json-data-type-handling-and-schema-less-mode 
>>>>
>>>> For instance, in the snippet below, the field "x" can be treated as 
>>>> double using "@fieldTypes".
>>>>
>>>> { "@class":"Account", "x": 100.341123124,"@fieldTypes": "x=d" }
>>>>
>>>> How can we do the same thing when "x" is in an embedded field as below? 
>>>> I have tried a few combinations but cannot get it to work. I am 
>>>> using community-2.0-M2.
>>>>
>>>> { "@class":"Account", "a": { "x": 100.341123124 } }
>>>>
>>>>  -- 
>>>>
>>>> --- 
>>>> 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.

Reply via email to