📜 ⬆️ ⬇️

Java Programmer Crib 1: JPA and Hibernate in Questions and Answers

image

Do you know the JPA? And hibernate? And if you check?

What is the meaning of the series of articles 'Java programmer cheat sheets'
During the work of Java programmer, I noticed that, as a rule, programmers constantly and systematically use on the strength of 10-20% of the capabilities of this or that technology, while other opportunities are quickly forgotten when new requirements appear, when you switch to a new job or prepare for a technical interview You have to re-read all the documentation and specifications from scratch. But the presence of a brief summary of the features of certain technologies (cribs) allows you to quickly refresh the memory features of a particular technology.
')



This article will be useful for those who are only going to study JPA and Hibernate (In this case, I recommend to open answers at once), and for those who already know JPA and Hibernate well (In this case, the article will allow you to test your knowledge and refresh technology features). Especially the article will be useful to those who are going to undergo a technical interview, where it will be possible to ask questions on JPA and Hibernate (or he is going to conduct a technical interview).


I recommend this to be the correct answer: if you answered the question in your opinion correctly and completely - put yourself 1 point, if you answered only partially - 0.5 point. Wherever possible, I tried to add quotes from the original documentation (but due to limitations of the Oracle license I can’t give too large quotes from the documentation).

General issues



Complex structures JPA



Basic Entity Operations




JPA annotations




JPA




Hibernate 5.0 JPA 2.1 JPA 2.0 JPA 2.1




PS If you find a technical error, an error in the translation or want to add something (including new interesting questions), I will be grateful if you write them in the comments of this article or in PM.

PPS I also advise you to look at my opensource project [useful-java-links] (https://github.com/Vedenin/useful-java-links/tree/master/link-rus) - perhaps the most comprehensive collection of useful Java libraries, frameworks and Russian-language instructional videos. There is also a similar [English version] (https://github.com/Vedenin/useful-java-links/) of this project and start the opensource subproject [Hello world] (https://github.com/Vedenin/useful-java -links / tree / master / helloworlds) to prepare a collection of simple examples for different Java libraries in one maven project (I will be grateful for any help).

Source: https://habr.com/ru/post/265061/


All Articles