OK, we have to calculate eligibility and rates for insanely complicated insurance enrollment data. Policies can be available based on age, employment characteristics, shoe size, etc. People born before 1962 may be excluded except when they live in Texas and have a poodle, etc.
So we can build classes that implement a specification pattern. We can nest and specifications, or specifications, etc. That's great. But now how do we serialize this to the database?
We could dump our c# classes to xml and leave it at that. But that is brittle, but almost impossible to query. Serializing a class to xml and dumping it into a big text field has a definite code smell.
Is there a canonical answer to how to put a nested specification into a database? My Google-fu fails me.