Only one "default" child

Only one "default" child

Old forum URL:

correodemarques posted on Thursday, June 09, 2011

Maybe I'm complicating things to much, but I want to know if somebody can find a way to do this:

I have one child collection filled with children objects which have a property called "Default".

I want that only one child can have that property to True at a given time.

I would like to accomplish that using a Business Rule and without casting the Target property within the rule to the type of the children (because I would like to use that rule in several collections types in my application)

The only way I find viable is creating an interface for the child collection and another for the children within the collection. Then cast the target property within the rule to the corresponding interface and use it to find the old Default and put the property to False.

I hope someone understand this mess.

Copyright (c) Marimer LLC