Yes, we've been thinking about improving the relation support to be mapped 
directly to SQL relational concepts.

Already in Nuxeo 5.3.2, there is a new Relation document type similar to 
Document, which has two fields (source and target). This type can be 
subclassed, and in Nuxeo 5.3.2 the tags use a Tagging subclass of Relation to 
link a document and a Tag document. Relations are meant to be placeless 
documents, and as they have no place (no parent) they can't inherit security, 
so they should be created only by a superuser in an unrestricted session. 
That's what the tag service does internally.

Subtypes or Relation can add new fields, which helps have rich relation objects 
if needed.

In the database we don't yet make source and target foreign keys but this may 
be added later if it's shown to work for all use cases (although it will be 
foreign key to hierarchy.id, not a schema-specific table).

For Nuxeo 5.4 we plan to refactor the current relation service that uses Jena 
to internally use this new Relation type instead. This gives a general 
many-to-many relation system that supports rich relations.


Your proposal to add a field type that is a relation is interesting, and has 
been already considered, although the restriction on the target type is 
probably a bit too strong to be made generic in Nuxeo.

The second part of your proposal that creates a vocabulary consisting of the 
document ids of a certain type is also interesting, but can probably be done by 
a specialized type of directory instead of using a view (views are very 
database-specific).

Anyway this is all interesting, and rest assured that moving to a 
straightforward SQL relational model is indeed in our goals.
--
Posted by "fguillaume" at Nuxeo Discussions <http://nuxeo.org/discussions>
View the complete thread: 
<http://www.nuxeo.org/discussions/thread.jspa?threadID=4003#12299>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm

Reply via email to