PreventPersistence blocks the generator and build step when DSL content contains validation issues. It prevents incomplete content from reaching downstream processing, but blocking persistence can stop domain experts from sharing faulty content for diagnosis. section 9.2.1 section 9.4
Apply the strategy with these considerations:
- Detect missing properties, such as an attribute name or type, before generation proceeds. section 9.2.1
- Stop the generator and build step from running on ASTs that contain issues. section 9.4
- Use it as a last measure when possible; preserving faulty ASTs can let domain experts share them with software developers. section 9.4
- Combine it with ImposeConstraints so users receive explicit issues rather than encountering an unexplained downstream failure. section 9.2.1
Missing attribute name
If an attribute has no name, saving the DSL content can be refused before camelCase receives an undefined value and the generator crashes. A stricter policy instead preserves the faulty AST for developers and prevents only generation and building. section 9.2.1 section 9.4
