[Cubicweb] INSERT documentation

Dimitri Papadopoulos Orfanos dimitri.papadopoulos at cea.fr
Wed Mar 26 16:58:31 CET 2014

Hi Nicolas and Sylvain,

Le 26/03/2014 16:49, Nicolas Chauvat a écrit :
> You are to read "V1 relationship (V2 | <value>)"
> Examples:
> INSERT BlogEntry E: E title "My article", E content "some text",
>                     T tags E, T eid 1234
> SET T tags E WHERE E is BlogEntry, E title "My article", T name "nice"

Now I get it. The example also clarifies the case of many attributes for
a single entity.

If I may suggest a few changes to the documentation:
* change the documentation to "V1 relationship (V2 | <value>)",
* explain that "relationship" stands for either "attribute" or "relation",
* explain the case of an entity with many attributes/relations,
* add an example of an entity with many attributes.

I had also the answer by myself after some experimentation. However it
took quite some time to understand the error message when trying to
insert a "CWsource" entity instead of the correct "CWSource". Try it for
yourself. The error message is rather cryptic. Could it maybe be improved?

Dimitri Papadopoulos
I2BM, NeuroSpin
F-91191 Gif-sur-Yvette cedex, France

More information about the Cubicweb mailing list