ClickOnChris

Christopher G Johnson: programmer, entrepreneur, gamer

Archive for August, 2010

JPA Annotation Cheatsheet

with one comment

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:

http://www.oracle.com/technetwork/middleware/ias/toplink-jpa-annotations-096251.html

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.

Post to Twitter

Fork me on GitHub

Written by clickonchris

August 31st, 2010 at 7:51 am

Posted in Java,Programming

Twitter links powered by Tweet This v1.8.2, a WordPress plugin for Twitter.

Switch to our mobile site