bclubb wrote:
Would you like this to be like a constraint on the database, or only for this particular instance of a collection? Also will this need to be done during the query and how do you know which one you would want if there were two entities? If you just want to know then you could create a hashlist with that foreign key as the key and catch the duplicate exception to indicate if it did or didn't contain that value twice.
Hello,
I would prefer if the the "constraint" is placed in the Data Layer code rather than in the database.
I'm exposing the tables to 3rd parties as LLBLGen objects, as a result, I like to enforce certain rules (i.e. unique entities within the CampParm EntityCollection) when the items are added to the object. This way, I can throw an exception ASAP before an adapter.save is called.