Feature #3846

Enforce validation before persisting model objects

Added by Robert Lemke over 10 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Should have
Category:
Persistence
Start date:
2010-03-02
Due date:
% Done:

100%

Estimated time:
8.00 h
PHP Version:
Has patch:
Complexity:

Description

If there are validation rules defined for a (domain model) object, they should be enforced before actually persisting the object. This includes the property validation rules as well as the (custom) validation rules for the whole object.

Later we also need to think of optimizations in this regard, e.g. if a property is not dirty and the object was reconstituted, there's no need to validate it again.

Associated revisions

Revision ecf96126 (diff)
Added by Karsten Dambekalns over 9 years ago

[+FEATURE] FLOW3 (Persistence): When persisting all new and dirty objects are validated now, resolves #3846. If validation fails, an exception is thrown.

History

#1 Updated by Robert Lemke over 10 years ago

  • Target version set to 1.0 alpha 3

#2 Updated by Robert Lemke over 10 years ago

  • Assignee set to Karsten Dambekalns

#3 Updated by Robert Lemke over 10 years ago

  • Target version deleted (1.0 alpha 3)

#4 Updated by Karsten Dambekalns about 10 years ago

  • Status changed from New to Accepted

#5 Updated by Karsten Dambekalns almost 10 years ago

  • Target version set to 1.0 alpha 8

#6 Updated by Karsten Dambekalns over 9 years ago

  • Status changed from Accepted to Needs Feedback

When validating during persistence exceptions thrown cannot be handled any longer, even redirects won't be stopped anymore. Thus it seems better to do the validation when adding to a repository. Any other thoughts?

#7 Updated by Robert Lemke over 9 years ago

  • Status changed from Needs Feedback to Accepted
  • Start date changed from 2009-07-08 to 2010-03-02
  • % Done changed from 0 to 80
  • Estimated time set to 8.00 h

#8 Updated by Karsten Dambekalns over 9 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 80 to 100

Applied in changeset r4010.

Also available in: Atom PDF