JPA & Hibernate: Basic Annotations You Need To Know

Описание к видео JPA & Hibernate: Basic Annotations You Need To Know

When you start learning and using Hibernate and JPA, the number of annotations might be overwhelming. But as long as you rely on the defaults, you can implement your persistence layer using only a small subset of them.
After you have mastered the basic annotations, you can take a look at additional customization options. You can, for example, customize the join tables of many-to-many associations, use composite primary keys, or share a primary key value between 2 associated entities.
But please be careful with any mapping that tries to handle a significant difference between your table model and your domain model. Quite often, the simpler mappings are better than the complex ones. They provide better performance and are much easier to understand by all developers in your team.
In this video I will show you the key annotations you need to know to use JPA and Hibernate.

If you are new here and want to learn how to build incredible efficient persistence layers with JPA and Hibernate and all types of other Java persistence related stuff, start now by subscribing and clicking the bell, so you don't miss anything.

0:00 Introduction
1:47 Define an entity
2:03 @Entity annotation
2:20 @Table annotation
3:15 Customize your mapping
3:38 @Column annotation
4:45 @Id annotation
4:56 @GeneratedValue annotation
5:56 @Enumerated annotation
6:29 @Temporal annotation
6:57 @Lob annotation
7:45 Association mappings
8:14 @ManyToMany annotation
10:19 @ManyToOne / @OneToMany annotations
12:49 @OneToOne annotation
13:32 Conclusion

Links mentioned:
How to generate primary keys with JPA and Hibernate: https://thorben-janssen.com/jpa-gener...
Mapping BLOBs and CLOBs with Hibernate and JPA:
https://thorben-janssen.com/mapping-b...

Like my channel? Subscribe!
➜ http://bit.ly/2cUsid8

Join the free Member Library:
https://goo.gl/dtyIIC

Read the accompanying post: https://thorben-janssen.com/key-jpa-h...

Want to connect with me?
Blog: https://thorben-janssen.com/
Twitter:   / thjanssen123  
Facebook:   / thoughtsonjava  

#JPA #Hibernate #annotations

Комментарии

Информация по комментариям в разработке