[Cubicweb] Would CWSchema be worth a CWEP ?

Nicolas Chauvat nicolas.chauvat at logilab.fr
Wed Jan 29 12:08:06 CET 2014

Hi List,

Below is another idea I am trying to float around to see if it gets
traction. If needed, I will turn it into an actual CWEP.

CWEP-???? - CWSchema

:champion: Nicolas Chauvat
:last update: 2014/01/29
:status: draft


A recurrent feature request from users has been to be able to modify the data
model without having to code or to easily adapt the data model to their very
specific case.

Another use case would be to define forms on-the-fly by describing their data
model and using the standard form engine based.


The main idea of this proposal is to introduce an entity CWSchema that would be
used as a namespace for instances of CWEType and CWRType.

At the time of this writing, the whole codebase implicitly assumes that
instances of CW*Type are together defining a unique data model.

A CWSchema named "default" could be introduced that would contain all the
instances of CW*Type. The codebase would have to be (heavily) modified to
explicitly reference the "default" CWSchema.

The second step would be to set permissions on CWSchema and allow some users to
create instances of CWSchema and CW*Type, then execute queries and call views
"in the context/namespace of CWSchema named XYZ".

Lots of questins are open at this point and it will be needed to give
that idea a try and see how it changes writing forms, classifying data
(think "dynamic" thesaurus) and import/export data (think user-defined
schema on top of "common" objects like persons, organisations and


Not yet.


  CWSchema.name = String(required=True, unique=True)

  CWRType [*]in_schema[1] CWSchema
  CWEtype [*]in_schema[1] CWSchema


- would yams or RQL need to be modified ?


Please comment.

Nicolas Chauvat

logilab.fr - services en informatique scientifique et gestion de connaissances  

More information about the Cubicweb mailing list