I think it has something to do with Hibernate 4. If I set the generation options to generate for Hibernate 3.6 it includes the PKs.