CREATE(Insert) – method calling sequence
UPDATE – method calling sequence
DELETE – method calling sequence
→ Entity.validateDelete()
→ DataSource.validateDelete()
→ Table.validateDelete()
→ Table.delete()
→ Table.postDelete()
READ (GET) – method calling sequence
Reads are non-intrusive and do not call table insert/update logic.
Important methods involved
-
Entity.mapEntityToDataSource()
-
Entity.mapDataSourceToEntity()
-
Computed columns
-
View / Query execution
🚫 validateWrite, insert, update are NOT called for reads.
Where to write logic (best practices)
✔ Put logic in ENTITY when:
-
Integration-specific rules
-
Defaulting only for imports
-
Transformation logic
-
External system mapping
✔ Put logic in TABLE when:
-
Core business rules
-
Validations
-
Must apply to forms + services + entities
❌ Avoid:
-
Business logic only in entity
-
DB logic in entity
-
Heavy logic in
postLoad()
Special hooks you should know
skipDataMethods(true)
-
Skips entity methods
-
Table logic still executes
Entity.enableStackedProcessing(true)
-
Improves bulk import performance
DataManagementImportExecution
-
Wraps everything during DMF import
Visual mental model (simple)