[SG|FW] Intermediate fix for database query mapping