Reputation: 21
i have a class of users with an attribute of address which is an embedded list of link type is embedded link map i already was entering with update @rid set address = { "k1":"v1", "k2:"v2" } this object is being placed fine, whenever i use the same query but replacing set with add in order to place a second object into the same list it is throwing a java.lang exception, whenever i am adding into the address directly accessing the vertex record its working fine so i want to know how can i add more objects of type map into the same list?
Upvotes: 0
Views: 1716
Reputation: 1579
I don't know if I understood you problem correctly, but here's a possible workaround:
create class Adress
create property Adress.city string
create property Adress.zipcode string
create class User
create property User.adress EMBEDDEDLIST Adress
insert into User set adress = [{"@type":"d","@class":"Adress","city":"london", "zipcode":"4323"}]
update User add adress = [{"@type":"d","@class":"Adress","city":"lisbon", "zipcode":"1516"}]
Upvotes: 0