I’m faced with the task:
Input:
Data model, that presents huge entity via 20 – 30 relational tables (SQL DB).
There are a lot of constraints + reference data links.
Tasks:
Add a draft mode support, this means that I can save object in any state (without filling all necessary fields, breaking a constraints etc.) When I publish object I must validate it against all constraints.
Does anybody know about good approach how to implement draft mode?
Non-Relational DB isn’t the case because of my contract with client.
I’ve been thinking on:
Duplicate tables, remove validations from the all duplicates and on publish move rows to original tables in the same transaction. This approach smells a lot.
All Objects are serializable into XML in my system, I can save their state into DB wile draft mode, again smells not good.
Simple answer: