How to insert embedded document in orientdb -


i have class etest1 properties name , text. have class etest2 properties lala , etest (the embedded etest1). not able insert anything.

if do:

insert etest2 content {"lala" : "test lala", etest : {"name" : "das", "text" : "dasd"}} 

i exception: field 'etest2.etest' has been declared embedded incompatible type used. value: {name=das, text=dasd}

if do:

insert etest2 content {"lala" : "test lala", etest : "#17:10"} 

i exception: field 'etest2.etest' has been declared embedded value recordid #17:10

so how can insert embedded document. if somehow possible first method tried. more doing 1 insert instead of 2 inserts.

if situation:

create class etest1 create property etest1.name string create property etest1.text string     create class etest2 create property etest2.lala string create property etest2.etest embedded etest1 

you can do:

insert etest2 content {"lala" : "test lala", etest : {"@type":"d", "@class":"etest1", "name" : "das", "text" : "dasd"}} 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -