revin... I have re-read your question... perhaps, and I mean perhaps, we can
implements a new feature...
So far, for a relationship, we are giving only the ability to define a
"cascade-validation" using [Valid].
We can extend it with:
Valid(Type entityValidator) where entityValidator shoud implements
IValidator
In this way you can define which is the "cascade-validation" to use from the
aggregate.

The other possible improvement is
[Valid(Force = true)]
In this way the user can fore the initialization of the
relation/association.

If you think that it is viable please add an issue, for each improvement, in
our issue tracker.
Thanks.

P.S. a copy of this mail was sent to dev-list

2010/1/13 revin <[email protected]>

> Hi,
>
> I have a structure:
>
>        [Serializable]
>        public struct Address
>        {
>                private string _street1;
>                private string _street2;
>                private string _suburb;
>                private string _state;
>                private string _postcode;
>                private string _country;
>                :
>       }
>
> Struct Address can be used by Employee or Customer.
> However, Address in Employee and Customer may have different
> constraints.
>
> For example:
> Employee.Address.County can only be Australia and NewZealand
> However, Customer.Address.Country can by anything (NotNull).
>
> I am using Attribute and Xml file to configure the validation.
> Is it possible to achieve?
>
> Regards,
> Revin.
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>
>
>


-- 
Fabio Maulo
--
You received this message because you are subscribed to the Google Groups "NHibernate Contrib - Development Group" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/nhcdevs?hl=en.

Reply via email to