Hi,

new to orientDb i try to create and insert data using REST:

test = '{ "transaction" : true, "operations" : [ { "type" : "c", "record" : 
{"@class":"Cardetail","vehicle_id":"1","from":"20130201","to":"99991231","optionList":[{"option_id":"11","option_code":"260","manuf_name":"Entfall
 
Schriftzug am Heck"}]}}]}';

error:


com.orientechnologies.orient.core.exception.OValidationException: The field 
'Cardetail.optionList' has been declared as EMBEDDEDLIST but an 
incompatible type is used. Value: {option_id=11, option_code=260, 
manuf_name=Entfall Schriftzug am Heck}


my Cardetail looks like : 


Class................: Cardetail

Default cluster......: cardetail (id=10)

Supported cluster ids: [10]

Cluster selection....: round-robin


PROPERTIES

-------------------------------+-------------+-------------------------------+-----------+----------+----------+-----------+-----------+----------+

 NAME                          | TYPE        | LINKED TYPE/CLASS           
  | MANDATORY | READONLY | NOT NULL |    MIN    |    MAX    | COLLATE  |

-------------------------------+-------------+-------------------------------+-----------+----------+----------+-----------+-----------+----------+

 to                            | INTEGER     | null                        
  | false     | false    | false    |           |           | default  |

 optionList                    | EMBEDDEDLIST| Option                      
  | false     | false    | false    |           |           | default  |

 from                          | INTEGER     | null                        
  | false     | false    | false    |           |           | default  |

 vehicle_id                    | STRING      | null                        
  | false     | false    | false    |           |           | default  |

-------------------------------+-------------+-------------------------------+-----------+----------+----------+-----------+-----------+----------+


and option:


PROPERTIES

-------------------------------+-------------+-------------------------------+-----------+----------+----------+-----------+-----------+----------+

 NAME                          | TYPE        | LINKED TYPE/CLASS           
  | MANDATORY | READONLY | NOT NULL |    MIN    |    MAX    | COLLATE  |

-------------------------------+-------------+-------------------------------+-----------+----------+----------+-----------+-----------+----------+

 option_code                   | STRING      | null                        
  | false     | false    | false    |           |           | default  |

 manuf_name                    | STRING      | null                        
  | false     | false    | false    |           |           | default  |

 option_id                     | STRING      | null                        
  | false     | false    | false    |           |           | default  |

-------------------------------+-------------+-------------------------------+-----------+----------+----------+-----------+-----------+----------+


I have also tried with "@class":"Option", ... in the optionList, same 
result.

Any clue???

Best


Timo

-- 

--- 
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