Relative Content

Tag Archive for validation

Validation and data persistence in a domain model

My (first and current) workplace (a .NET shop) suffers from an over-abundance of anemic domain models, to the extent that I don’t really know how validation and data persistence should be handled in a proper domain model.

Pine Script – Long or Short Strategy

Only shorts are not working when using the following code. It works for LONG & SHORT, only LONGs but not for ONLY shorts. Shorts are disabled when using longs and so on.

ddd enforce business rule

Am struggling to identify whenever to create new domain service or capture business rules in my domain model.
Assume we cannot assign Account to Invoice if Account IsInactive or Blocked

How to prevent re-checking already-checked data?

I have a class with a validId($id) method that is called by the constructor and by public function load($id). The method queries the database to see if the id exists and returns true/false.