Fixed persistence exception on primary keys.