|
12 | 12 | import com.baeldung.hibernate.pojo.Student; |
13 | 13 | import com.baeldung.hibernate.pojo.User; |
14 | 14 | import com.baeldung.hibernate.pojo.UserProfile; |
| 15 | +import com.baeldung.hibernate.pojo.inheritance.Animal; |
| 16 | +import com.baeldung.hibernate.pojo.inheritance.Bag; |
| 17 | +import com.baeldung.hibernate.pojo.inheritance.Book; |
| 18 | +import com.baeldung.hibernate.pojo.inheritance.Car; |
| 19 | +import com.baeldung.hibernate.pojo.inheritance.MyEmployee; |
| 20 | +import com.baeldung.hibernate.pojo.inheritance.MyProduct; |
| 21 | +import com.baeldung.hibernate.pojo.inheritance.Pen; |
| 22 | +import com.baeldung.hibernate.pojo.inheritance.Person; |
| 23 | +import com.baeldung.hibernate.pojo.inheritance.Pet; |
| 24 | +import com.baeldung.hibernate.pojo.inheritance.Vehicle; |
15 | 25 |
|
16 | 26 | import org.hibernate.SessionFactory; |
17 | 27 | import org.hibernate.boot.Metadata; |
@@ -50,6 +60,16 @@ private static SessionFactory makeSessionFactory(ServiceRegistry serviceRegistry |
50 | 60 | metadataSources.addAnnotatedClass(OrderEntry.class); |
51 | 61 | metadataSources.addAnnotatedClass(OrderEntryIdClass.class); |
52 | 62 | metadataSources.addAnnotatedClass(UserProfile.class); |
| 63 | + metadataSources.addAnnotatedClass(Book.class); |
| 64 | + metadataSources.addAnnotatedClass(MyEmployee.class); |
| 65 | + metadataSources.addAnnotatedClass(MyProduct.class); |
| 66 | + metadataSources.addAnnotatedClass(Pen.class); |
| 67 | + metadataSources.addAnnotatedClass(Person.class); |
| 68 | + metadataSources.addAnnotatedClass(Animal.class); |
| 69 | + metadataSources.addAnnotatedClass(Pet.class); |
| 70 | + metadataSources.addAnnotatedClass(Vehicle.class); |
| 71 | + metadataSources.addAnnotatedClass(Car.class); |
| 72 | + metadataSources.addAnnotatedClass(Bag.class); |
53 | 73 |
|
54 | 74 | Metadata metadata = metadataSources.buildMetadata(); |
55 | 75 | return metadata.getSessionFactoryBuilder() |
|
0 commit comments