After revert all changes. fix autogeneration PK, fix exceptions.