Check for self.autoincrementing instead of self.primary_key
Add test cases for tables with or without a (autoincrementing) primary key