What I had to do was find the object, get its list of embedded items,
add my new thing to the list, then update the object with the entire
new list.
On Tue, Oct 29, 2013 at 9:53 AM, Michael Campbell
<
michael....@gmail.com> wrote:
> I have a list of items in my class, and the items in this list are
> themselves multi layer.
>
> I'm having a hard time figuring out the syntax to add a new item to the list.
>
> My class is "searchJobs", and the list of items is
> "searchJobTaskContexts". My first attempt at an update to add a
> "context" to this embedded list is this, with the associated error
> (this is using the console.sh):
>
> update searchJobs add searchJobTaskContexts = {"runState": "FOO",
> "contextData": {"newKey" : "newValue", "newList": ["a", "b", "c"]}}
> where @RID = '#9:0'
>
> Error: com.orientechnologies.orient.core.exception.OCommandExecutionException:
> Error on execution of command: sql.select from searchJobs WHERE @RID
> = '#9:0'
>
> Error: java.lang.ClassCastException: java.util.HashMap cannot be cast
> to com.orientechnologies.orient.core.db.record.OIdentifiable
>
>
> There is no schema nor any properties.
>
> 1.5.1.