Converted primary key before query