Provide stack traces when a primary key lookup fails with a sql exception