Avoid potential Primary Key misidentification for string values

Use the associative method to query the modContext.key value to prevent misidentification of the value as an expression instead of a PK value
Validate and sanitize _ctx placeholder used by ResourceManagerController