
Advance your Hibernate mapping skills with sets, lists, maps, sorted maps, sorted sets, embeddables, enums, inheritance strategies. Configure Maven, IDEs, and databases, and access source code and slides.
Discover a mapping overview in Hibernate, covering collections (list, set, map with sorted variants), embeddable components, enums, and inheritance mappings: single table, table per class, joined, and mapped superclass.
Map a student's image file names as a set with Hibernate, using element collection and collection table, and persist the student and images in a transaction.
Map collections with element collection and collection table, linking via join columns to the parent entity. Compare element collection with one-to-many when using primitives or embeddables and note its limitations.
Set up a Maven Hibernate project from a quickstart archetype, configure Java version, add starter dependencies, and prepare resources and database tables for the hb student tracker using MySQL Workbench.
Create a student entity class with Jpa annotations, map id as generated key, and map first_name, last_name, and email to columns; generate getters, setters, and a toString.
Map a set of image filenames for a student using @ElementCollection, with a collection table named image and a join column student_id; note the default student_images if not specified.
Create the main app to map a student’s images set with Hibernate, using a HashSet for the images and demonstrating element collection mapping via a persisted transaction.
Map lists as ordered collections with duplicates using Hibernate's element collection and OrderColumn to track image order, with examples like emails and restaurant waitlists, and a student-images relationship.
Copy and rename the project, configure hbm2ddl create, map the element collection to a list, and add an order column to track item positions, enabling duplicates and ordered images.
Learn how maps use unique keys to map to values, with examples like error codes and image file names with descriptions, and annotate with @MapKeyColumn and @ElementCollection to store them.
Discover how sorted sets enforce uniqueness and return elements in a chosen order, with examples like waiting lists and image collections sorted by file name in descending order using @OrderBy.
Demonstrates configuring a Hibernate sorted set with @OrderBy, switching to org.hibernate.annotations.OrderBy, and persisting student images in a demo app that creates and queries image data.
Demonstrates mapping sorted sets in hibernate with @OrderBy to sort a student's associated images by filename in descending and ascending order, and explains adding a no-argument constructor to satisfy hibernate.
Explore sorted maps that maintain unique keys and sort by file name in an image collection, with duplicates not allowed, and use @OrderBy and @MapKeyColumn for ascending retrieval.
Explore sorting maps with Hibernate by annotating with order by, using sorted map and tree map, and validating in-memory custom sorting with a comparator for descending order.
Map embedded components in Hibernate by modeling address as an embeddable value type, embedding street, city, and zip code in the student table, and reuse across entities.
Define an address as an embedded value type with street, city, and zip and annotate it as embeddable. Embed this address into the student as home address using add embedded.
Embed the home address as an embedded value type in a student entity by creating an Address, linking with tempStudent.setHomeAddress, and storing city, street, and zip in the same table.
Reuse an embedded address in the student entity by adding a billing address and overriding column names with AttributeOverrides to map billing fields in the same table.
Map Java enums to a database column using @Enumerated, define a status enum (active, inactive), and reference it in the student class to persist and query status values.
Map an enum in Hibernate by creating a Status enum, using @Enumerated(EnumType.STRING), and persisting active and inactive states in the student table.
explore how to map inheritance with Hibernate, comparing single table, table per class, joined table, and mapped superclass strategies, using a user–student–instructor example and a discriminator column.
Define single table inheritance with USER_TYPE as the discriminator, assign STUDENT and INSTRUCTOR values, and map all fields to the user table.
Explore inheritance mapping using a single-table strategy in Hibernate by turning a user base class into abstract, and implementing student and instructor subclasses with proper entity annotations.
Learn single table inheritance in hibernate by configuring a discriminator column user_type with custom values for student and instructor, and validate via app runs and MySQL Workbench.
Master table-per-class inheritance in Hibernate by mapping concrete subclasses to separate tables, removing discriminators, configuring table-based ID generation with a sequence table, and updating to MySQL 8 dialect.
Explore inheritance mapping with table per class in Hibernate. Learn how sequence tables generate IDs thread-safely for subclass and superclass fields, and evaluate advantages and trade-offs.
Configure table-per-class inheritance in Hibernate, remove discriminator annotations, and switch ID generation to GenerationType.TABLE; update pool size and dialect to MySQL 8.
Explore table-per-class inheritance in Hibernate by creating and inspecting instructor and student tables, including subclass and inherited fields, with thread-safe id generation via Hibernate sequences.
Learn the joined table inheritance strategy in Hibernate, mapping a superclass to a common table and subclasses to separate tables joined by foreign keys, with normalization and trade-offs.
Apply the joined table inheritance strategy by switching to InheritanceType.joined and GenerationType.identity, drop and recreate tables, and verify mapping between superclass and subclass tables.
Master inheritance mapping in Hibernate by annotating the base class with @MappedSuperclass and using entity annotations on subclasses, then run and verify subclass data.
Compare inheritance mapping strategies—single table, table per class, joined tables, and mapped superclass—recapping discriminator column, performance tradeoffs, and id generation considerations.
Explore the trade-offs of Hibernate inheritance strategies, comparing single table, table per class, joined table, and mapped superclass for performance, normalization, and data integrity.
This course covers advanced Hibernate development techniques. You will learn how to easily use Hibernate to map Sets, Lists, Embeddable, Enums and Inheritance.
---
You will type in every line of code with me in the videos ... all from scratch.
I explain every line of code that we create. So this isn't a copy/paste exercise, you will have a full understanding of the code.
---
Live Coding - I code all of the real-time projects from scratch
All source code is available for download
Responsive Instructor - All questions answered within 24 hours
---
PDFs of all lectures are available for download
Professional video and audio recordings (check the free previews)
---
Why You Should Take This Course?
Hibernate is an amazing framework for object-to-relational mapping. It is fairly easy to get started with Hibernate. However, when you need to apply advanced development techniques, it is hard to find helpful, up-to-date information. There is a ton of information available for free on the Internet, but most of it is outdated or poorly written.
This course provides the up-to-date information on advanced Hibernate techniques. In the course, we demystify the concepts and show you practical examples that work using the latest version of Hibernate. Also, you will receive technical support if you have questions about the course material.
You Will Learn How To
Create mappings for Java Sets, Lists (both unsorted and sorted)
Integrate embeddable components in Hibernate entities
Add support for enums with Hibernate
Apply various Hibernate inheritance strategies
Compare the Hibernate inheritance strategies in terms of performance and table design
Quality Material
You will receive a quality course, with solid technical material and excellent audio and video production. This is my seventh course at Udemy.
My first six courses on Udemy were:
Eclipse IDE for Beginners
Java Database Connection (JDBC)
JavaServer Faces (JSF) for Beginners
JSP and Servlets for Beginners
Spring and Hibernate for Beginners
Deploy Java Spring Apps to the Amazon Cloud (AWS)
These courses have received rave 5 star reviews and over 200,000 students have taken the courses. Also, these courses are the most popular courses in their respective categories.
I also have an active YouTube channel where I post regular videos. In the past year, I’ve created over 300 video tutorials (public and private). My YouTube channel has over 4 million views and 32k subscribers. So I understand what works and what doesn’t work for creating video tutorials.
No Risk – Udemy Refund
Finally, there is no risk. You can preview 25% of the course for free. Once you purchase the course, if for some reason you are not happy with the course, Udemy offers a 30-day refund (based on Udemy's Refund Policy).
So you have nothing to lose, sign up for this course and learn how to apply advanced Hibernate development techniques!
Target Audience
Java Developers with basic Hibernate experience