Check primarykey detection