I did alot of work with XML schema and JAXB to generate java beans. I never touched the generated beans, only extended them in other beans, because otherwise I might loose code if beans are regenerated. I actually generate my beans newly automatically before any build is allowed to happen. This gurantees me to only always have one truth.
Is the same idea valid for JPA bean generation, or is JPA bean generating meant to be a one time thing?
Should you touch the generated JPA beans or are they untouchable? I can't find any style or best practise recommendation...
It's actually a best practice to put code (other than getters and setters) in JPA entities. Not doing so results in an anemic domain model.
Generating JPA entities from a schema can be useful to start you up, but once this is done, you should fine-tune the code and the design of these entities and add business logic in them. It's not hard at all to write entities from scratch, without any generation phase.