Important Configuration Notes
Important Configuration Notes
Relation Types
- One-to-Many: Parent has multiple children (Institute → Fee Types)
- Many-to-One: Child belongs to parent (Fee Type → Institute)
- Always set both sides when
relationCreateInverseis true
Cascade Options
- cascade: Delete children when parent is deleted
- Use for tightly coupled data (Institute and its Fee Types)
Audit Tracking
- Enable on fields that need change history
- Typically enabled for business-critical fields
- Not needed for computed or temporary fields
User Key Fields
- Mark fields that uniquely identify records
- Used in URLs and references
- Should be human-readable and unique
Index Fields
- Enable for fields used in searches and filters
- Improves query performance
- Typically applied to status fields and foreign keys
Media Storage
default-filesystem: Stored on local server diskdefault-aws-s3: Cloud Storage (Amazon S3)- Set appropriate size limits based on content type
Child Models
- Inherit from a parent model (Institute User extends User)
- Share parent's primary key
- Get base fields automatically from parent
Default Values
- Set sensible defaults for status fields ("Pending")
- Set numeric defaults to 0 for amount fields
- Set boolean defaults to false for flags
Validation After Creation
After creating each model, verify:
- All required fields are marked correctly
- Unique constraints are set where needed
- Relations are bidirectional (if
relationCreateInverseis true) - Default values are appropriate
- Audit tracking is enabled on business-critical fields
- Media storage providers are configured
- Computed field triggers are set correctly (if applicable)
info
For more detailed guidance on creating Modules, Models, and Fields in SolidX, refer to the Module Builder documentation.