pub fn find_entity_id( conn: &Connection, namespace: &str, name: &str, ) -> Result<Option<i64>, AppError>
Looks up the entity by name and namespace. Returns the id when it exists.