ClickOnChris

Christopher G Johnson: programmer, entrepreneur

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.

Written by clickonchris

August 31st, 2010 at 7:51 am

Posted in Java,Programming

One Response to 'JPA Annotation Cheatsheet'

Subscribe to comments with RSS or TrackBack to 'JPA Annotation Cheatsheet'.

  1. a very good post

    metin2 yang

    12 Sep 10 at 9:19 pm

Leave a Reply

Switch to our mobile site