JPA and Hibernate examples, tips, tricks, do's and don'ts