In my experience, primary keys cause fewer issues when they don't need to change. I use a simple auto-incrementing integer as the primary key, and set fields like email and username to have the unique attribute, rather set them to be primary keys. This allows users to change email and username without effecting the primary key, while still preventing other rows from containing the same value in that field. This approach works well for me.

@BhSimon - I see your point. For 99.9% of my application, the username is immutable, so having the username as the primary key isn't an issue. This anonymization process is a behind-the-scenes administrative function that happens after the user accounts are no longer being used. So while your point is a good one, it would be much less work to resort to PHQL (if I have to) for this one purpose, than redesign my database. Thanks nonetheless.