- Also on the same example, assigning a spouse to a
person must
assign
the opposite (spouse spouse: aPerson) as it's a bidirectionnal
relation. Is it something you'd like to address (unidirectional and
bidirectional references) ?
Yeah, this is something that is currently missing. Magritte does not
work well with cyclic object graphs. You currently have to explicitly
break and restore the graph at some point.
- It sems to me that MAValidation allow to model unary
contraints like
value of lastName can't be nil, or valid value of marital status
are in
the list #(unmarried married widowed). Bot for more complicated
constraints (binary, constraints on instances...) it seems
impossible to
me. For instance, if a person maritalStatus is set to unmarried, then
the person cannot have children (this is the model example ;) ). Would
you like to allow to model that kind of constraints or is it out of
the
scope of Magritte ? I think this is becoming very complex (CSP field,
rule based...) especially if we want to do that on the fly but maybe
doing a check afterwhile could be more realistic...
It is already possible, you have to add your validation rules to the
container instead. I agree that the current implementation is not
that ideal.
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch