Hello,

as a new user of Isis, I would first like to thank you for open-sourcing
the software. I am a developer from Germany who is interested in using
Isis (and RO) for a customer project.

Reading section 9 in the RO spec, I would have expected to be able to
POST the following to http://~/objects/simple.SimpleObject/ (in
SimpleApp-PROTOTYPE-with-fixtures):

{
  "members": {
    "name": {
      "value": "Quux"
    }
  }
}

but this leads to a 400 with the following warning:

199 RestfulObjects Could not find properties list (no 
members[objectMemberType=property]); got {"members":{"name":{"value":"Quux"}}}

I then debugged the application and had the impression that members must
be an array and that each element must have the attribute
objectMemberType set to "property":

{
  "members" : [ {
    "name" : {
    "value": "Quux"
    },
    "objectMemberType": "property"
  } ]
}

With such a JSON, the response is a '500 Server Error' and the logs show

Caused by: org.hsqldb.HsqlException: integrity constraint violation: NOT
NULL check constraint; SYS_CT_10102 table: "SimpleObject" column: "name"

Debugging again shows that in ObjectAdapterUpdateHelper's
copyOverProperties, the following is called with the id "name":

propertiesList.getRepresentation(id)

which returns null, so the property name is not copied to the object
which is to be persisted, resulting in the NOT NULL exception.


I guess that I'm completely misunderstanding how I should use the
resource.

Would someone be so kind to put me on the right track?


Thank you


Kambiz Darabi
-- 
m-creations gmbh
Acker 2
55116 Mainz
Germany

W: http://www.m-creations.com
E: dar...@m-creations.com
--
Registered Office: Mainz, HRB Mainz 7382
Managing Directors: Frank Pacholak, Kambiz Darabi

Reply via email to