Загрузка...

Java Spring Boot - JPA - Hibernate - H2 - Entities Inheritance Mapping - Table Per Class Strategy

In this video we will configure database connection with H2 using spring properties and autoconfiguration. Later we will learn how to use inheritance together with JPA and Hibernate in Java Spring Boot. We will create super class (parent class) and then two sub-classes (child classes) which will inherit all of the properties and mapping information from parent class. We will use @Inheritance annotation to specify strategy which we will use. This time it will be TABLE_PER_CLASS strategy. In the final stage we will learn how to use inheritance in case of repositories which we will use to persist our entities into the database. Also we will check out how to handle mutliple beans implementation using @Primary annotation. We will track everything using H2 web console. Keep coding!

Joined table source code: https://github.com/codeforgeyt/jpa-inherit-joined-table
Joined table video: https://youtu.be/CMvq2i9Pcdo

Single table source code: https://github.com/codeforgeyt/jpa-inherit-single-table
Single table video: https://youtu.be/7dBijbBdgbc

Superclass source code: https://github.com/codeforgeyt/jpa-inherit-superclass
Superclass video: https://youtu.be/eq7WCvXqUfE

Table per class source code: https://github.com/codeforgeyt/jpa-inherit-table-per-class
Table per class video: https://youtu.be/YHA3LEwBMEE

Follow //CodefForgeYT on:
FB: https://www.facebook.com/codeforgeyt/
Twitter: https://twitter.com/codeforgeyt
GitHub: https://github.com/codeforgeyt
Instagram: http://instagram.com/codeforgeyt

Видео Java Spring Boot - JPA - Hibernate - H2 - Entities Inheritance Mapping - Table Per Class Strategy канала CodeForgeYT
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять