fixed bugs(EntityManagerFactory unwrap SessionFactory)