|
1 | 1 | package com.baeldung.hibernate; |
2 | 2 |
|
| 3 | +import java.io.FileInputStream; |
| 4 | +import java.io.IOException; |
| 5 | +import java.net.URL; |
| 6 | +import java.util.Properties; |
| 7 | + |
| 8 | +import com.baeldung.hibernate.entities.DeptEmployee; |
3 | 9 | import com.baeldung.hibernate.optimisticlocking.OptimisticLockingCourse; |
4 | 10 | import com.baeldung.hibernate.optimisticlocking.OptimisticLockingStudent; |
5 | 11 | import com.baeldung.hibernate.pessimisticlocking.Individual; |
|
16 | 22 | import org.hibernate.boot.registry.StandardServiceRegistryBuilder; |
17 | 23 | import org.hibernate.service.ServiceRegistry; |
18 | 24 |
|
19 | | -import java.io.FileInputStream; |
20 | | -import java.io.IOException; |
21 | | -import java.net.URL; |
22 | | -import java.util.Properties; |
| 25 | +import com.baeldung.hibernate.pojo.Course; |
| 26 | +import com.baeldung.hibernate.pojo.Employee; |
| 27 | +import com.baeldung.hibernate.pojo.EntityDescription; |
| 28 | +import com.baeldung.hibernate.pojo.OrderEntry; |
| 29 | +import com.baeldung.hibernate.pojo.OrderEntryIdClass; |
| 30 | +import com.baeldung.hibernate.pojo.OrderEntryPK; |
| 31 | +import com.baeldung.hibernate.pojo.Person; |
| 32 | +import com.baeldung.hibernate.pojo.Phone; |
| 33 | +import com.baeldung.hibernate.pojo.PointEntity; |
| 34 | +import com.baeldung.hibernate.pojo.PolygonEntity; |
| 35 | +import com.baeldung.hibernate.pojo.Product; |
| 36 | +import com.baeldung.hibernate.pojo.Student; |
| 37 | +import com.baeldung.hibernate.pojo.TemporalValues; |
| 38 | +import com.baeldung.hibernate.pojo.User; |
| 39 | +import com.baeldung.hibernate.pojo.UserProfile; |
| 40 | +import com.baeldung.hibernate.pojo.inheritance.Animal; |
| 41 | +import com.baeldung.hibernate.pojo.inheritance.Bag; |
| 42 | +import com.baeldung.hibernate.pojo.inheritance.Book; |
| 43 | +import com.baeldung.hibernate.pojo.inheritance.Car; |
| 44 | +import com.baeldung.hibernate.pojo.inheritance.MyEmployee; |
| 45 | +import com.baeldung.hibernate.pojo.inheritance.MyProduct; |
| 46 | +import com.baeldung.hibernate.pojo.inheritance.Pen; |
| 47 | +import com.baeldung.hibernate.pojo.inheritance.Pet; |
| 48 | +import com.baeldung.hibernate.pojo.inheritance.Vehicle; |
23 | 49 |
|
24 | 50 | public class HibernateUtil { |
25 | 51 | private static SessionFactory sessionFactory; |
@@ -72,6 +98,8 @@ private static SessionFactory makeSessionFactory(ServiceRegistry serviceRegistry |
72 | 98 | metadataSources.addAnnotatedClass(PessimisticLockingCourse.class); |
73 | 99 | metadataSources.addAnnotatedClass(com.baeldung.hibernate.pessimisticlocking.Customer.class); |
74 | 100 | metadataSources.addAnnotatedClass(com.baeldung.hibernate.pessimisticlocking.Address.class); |
| 101 | + metadataSources.addAnnotatedClass(DeptEmployee.class); |
| 102 | + metadataSources.addAnnotatedClass(com.baeldung.hibernate.entities.Department.class); |
75 | 103 | metadataSources.addAnnotatedClass(OptimisticLockingCourse.class); |
76 | 104 | metadataSources.addAnnotatedClass(OptimisticLockingStudent.class); |
77 | 105 |
|
|
0 commit comments