Collection validation revisited

Collection validation revisited

Old forum URL: forums.lhotka.net/forums/t/769.aspx


skagen00 posted on Monday, July 31, 2006

Looking at a prior thread, I wasn't able to figure out an approach for my current problem and was wondering what others might do given this situation.

A profile can have multiple addresses in our system. They may be marked as Seasonal and have a particular month/day start and end.

The business rule is that Seasonal addresses cannot have an overlap period. That is, I can't have two seasonal addresses that say "this is the temporary address to use" on August 3rd.

So the rule is really pertinent to the collection of addresses. Whenever "Seasonal?" changes for an address or whenever one of the elements of Seasonal (Month & Day, Start & End) changes, I need to make sure all of the seasonal addresses adhere to the rule. Those that have an overlap are invalid.

It seems that every time an element of the seasonal qualities on an address changes, I'd need to tell the collection to verify that any seasonal addresses within the collection don't create an overlap - and if they do, to somehow ensure that the particular addresses in question become invalid.

I'm a little confused on how the communication should occur between the child and collection.

 

 

Copyright (c) Marimer LLC