fix reql exception for primary key exisiting in the data

this needs to be verified with secondary keys too