Delegate primary_key to superclass when necessary, otherwise default; added testing
Fix merge conflict from superclass_delegating_primary_key