This documents field mappings between domain models and database models where field names differ.
metadata: Dict[str, Any]item_metadata: Column(JSON)to_domain() and from_domain() conversion methodsmetadata: Dict[str, Any] and file_metadata: Dict[str, Any]file_metadata: Column(JSON)metadata maps to database file_metadataintent_id: Optional[str]Intent.workflow_id (reverse relationship)intent_id populated through relationship in conversion methodsThe PM-056 schema validator currently reports these as critical errors because it performs direct field name matching. The conversion methods properly handle the mappings, so these “errors” are actually false positives.
Future enhancement: Update validator to understand field mappings defined in conversion methods.