[Cubicweb] About cwuri

Aurélien Campéas aurelien.campeas at logilab.fr
Wed Feb 12 15:51:36 CET 2014


Dear List,

While reviewing https://www.cubicweb.org/ticket/3390388 and some other
cwuri-related issues, along with working on the container cloning
feature, it occurred to me that I didn't know what cwuris are.

Digging in the doc, I read this:

`cwuri`
  Reference URL of the entity, which is not expected to change.

(in devrepo/datamodel/metadata.rst).


This is troubling. It seems we are storing in the database, for each
single entity, something of the form `http://someurl/eid`.

The implementation suggests that the base url is config.base_url,
which is hence instance config dependant.

This contradicts the "not expected to change" part of the spec.

Moreover, I strongly object to storing in the database a second primary
key (we already have eids) with a component that may actually change
and is sometimes not even defined.

My current conclusion is that the cwuri attribute is misdesigned
and does not belong to the database.


Regards,
Aurélien.




More information about the Cubicweb mailing list