Whenever I need need help configuring JPA annotations I turn to google, and I always find it difficult to find a good cheatsheet.
Well here is my favorite JPA annotation cheatsheet. Even though it says Oracle and Toplink it applies to any Spring/JPA/Hibernate technology stack:
Oh yeah, and here’s my tip on using cascades: Never use CascadeType.ALL! Use MERGE, PERSIST, and maybe REMOVE if you want to cascade your deletes. CascadeType.ALL will result in poor performance and unintended consequences.