yams #9933 change relation definition syntax [open]
| |
priority | normal |
---|---|
type | enhancement |
done in | 1.0.0 |
load | 0.500 |
load left | 0.500 |
closed by | <not specified> |
| |
priority | normal |
---|---|
type | enhancement |
done in | 1.0.0 |
load | 0.500 |
load left | 0.500 |
closed by | <not specified> |
Comments
-
2009/08/17 14:14, written by sthenault
- other parameters still given using named arguments
- deprecates usage of RelationDefinition
- we still have to distinguish relation type / definition, so we keep RelationType class as today
-
2010/01/27 07:23, written by adimascio
- remove ObjectRelation and BothWayRelation
- split cardinality in two distinct properties subjcard and objcard and use the standard UML notation (i.e 1..n, 0..1, etc.)
- rename SubjectRelation into Relation and continue to allow relation definitions inside the entity class
- keep class-style kind of declaration (as in class MyRelation(RelationDefinition): ...)
-
2010/01/27 07:29, written by sthenault
-
2010/02/10 20:35, written by nchauvat
-
2010/02/11 07:48, written by sthenault
-
2010/02/11 08:08, written by adimascio
-
2010/02/11 08:43, written by sthenault
-
2010/02/11 08:49, written by adimascio
-
2010/02/11 09:05, written by sthenault
-
2010/02/11 09:35, written by acampeas
-
2010/01/27 12:34, written by nchauvat
-
2010/01/27 13:12
-
2010/02/10 20:34, written by nchauvat
add commentalso:
I think that split_into = Relation(Order[1][composite], WorkOrder[1,N]) is a bad syntax and requires additional complexity in the code for little (well, zero from my POV) gain.
After some discussions with Alexandre and Sylvain, we've agreed on the following agenda :
Any other thoughts ?
use the same Relation class for relation defined in entity definition and for parametrized classes?
please disallow defining relation within entities.
huum, this sugar seems valuable to me but I won't fight to keep it if everyone
is fine with removing it.
I agree with Sylvain. I find that 80% of the time, it's simpler and convenient to have the definition of the relation inside the entity type class.
I've one argument though in favor of dropping this ability: when using this
people rely (without knowing it) on an implicitly created relation type, and the
relation added that way isn't importable. This is problematic if one want to
import it to modify permissions or such.
Good point. Also, should we consider renaming RelationType and RelationDefintion ? I've got the feeling some persons get confused.
I think we still need to differentiate the concepts, and imo this is essentially
a question of vocabulary that should be properly explained (it's in the book) and
understood. What would you propose to make things clearer?
I find these perfect names and never encountered someone confused by them.
What confuses people is inline (in Entity) relation definition (the Object/Subject thing), and possibly the implicit relation type creation happening there, and (thing of the past) impossibility to set permissions there.
please provide examples... and reconsider allowing the definition of relations within the definition of entities.
you mean you don't agree with "continue to allow relation definitions inside the entity class"
yes, that's what I mean.