cubicweb #676902 spécifier comportement cardinalité sur relation multiple [open]
for instance. in the expense cube we may wish to have:
currently, the 1 and ? are somewhat conflicting and isn't properly checked (and may be badly handled). Define an expected behaviour, investigate needed fixes (integrity hooks). | |
priority | normal |
---|---|
type | enhancement |
done in | <not specified> |
load | 1.000 |
load left | 1.000 |
closed by | <not specified> |
similar entities
- cubicweb #809460 checking of schema.py for name conventions in attributes
- cubicweb #968752 same_as cardinality should be '**'
- cubicweb #663361 RQLConstraint / vocabulary interaction w/ inlined forms
- cubicweb #473794 when an entity type is renamed, physical db index should be renamed as well
- cubicweb #511718 explain why rql expr insertion doesn't work to ease security debugging
[see all]
Comments
-
2010/02/09 10:03, written by acampeas
-
2010/02/09 10:37, written by mailbot
-
2010/02/09 10:43, written by acampeas
-
2010/02/09 10:58, written by mailbot
-
2010/11/10 16:33, written by acampeas
-
2010/11/10 16:41, written by sthenault
-
2010/11/10 18:36, written by acampeas
-
2010/11/10 18:36, written by acampeas
-
2010/02/11 08:56, written by sthenault
-
2010/07/01 06:44, written by smarcu
- X in_case Case -> 1?
- Y in_case Case -> 1*
- X in_case Case -> 1*
add commentimho cardinalities should be a relation type property
can't go that way unless by special casing attribute relation.
no, because cardinality on relation type means that attribute 'name'
should have the same cardinality for *all* entity types
Indeed.
But attributes are special anyway; people rarely think of Foo.name and Bar.name as the same rtype (only sometimes, while typing some rql and almost by accident, does the genericity show up (as a good/practical thing)). Entities are a bit object-like and we tend to see them as namespaces.
I have noted another discrepancy wrt attributes cardinality btw: Foo name String cardinality can be '11' or '?1'. But by analogy with relations, shouldn't it be '1*' / '?*' ?
semantically a final value can be linked to 1 and only 1 entity.
yes
brain fart of mine
yes brain fart of mine
i think we should have a property on the relation type telling if subject/object cardinality are applied as a whole (hence should be consistent for each entity type) or for each relation definition. With a default to 'whole' on relations and 'each' for attributes for bw compat.
In the example below, has_lines could have subjcardtype='whole', objcardtype='each'.
another example, we may wish to have:
Currently, X in_case Case -> 1? is not possible (error in operations which check cardinality during the commit)