BAEL-1221: Added README.md with build and run instructions (#2947)

* BAEL-1221: Added README.md with build and run instructions

* BAEL-1281: Hibernate - Mapping Date/Time values (java.util and java.time)
This commit is contained in:
Sergey Petunin
2017-11-04 11:50:01 +01:00
committed by Eugen
parent 7bc6714340
commit bc899ef38f
4 changed files with 340 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ package com.baeldung.hibernate;
import com.baeldung.hibernate.pojo.Employee;
import com.baeldung.hibernate.pojo.EntityDescription;
import com.baeldung.hibernate.pojo.Phone;
import com.baeldung.hibernate.pojo.TemporalValues;
import org.hibernate.SessionFactory;
import org.hibernate.boot.Metadata;
import org.hibernate.boot.MetadataSources;
@@ -31,6 +32,7 @@ public class HibernateUtil {
metadataSources.addAnnotatedClass(Employee.class);
metadataSources.addAnnotatedClass(Phone.class);
metadataSources.addAnnotatedClass(EntityDescription.class);
metadataSources.addAnnotatedClass(TemporalValues.class);
Metadata metadata = metadataSources.buildMetadata();
return metadata.getSessionFactoryBuilder()