Changes to primary key annotations. Addition of key generation annotation. Refactoring of supporting logic.