resolve primary key columns by key instead of name