Hibernate annotation 一对多,多对一
?
??
package com.hibernate.test;import org.hibernate.SessionFactory;public class ORMappingTest {private static SessionFactory sessionFactory;@BeforeClasspublic static void setUpBeforeClass() throws Exception {sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();}@AfterClasspublic static void tearDownAfterClass() throws Exception {sessionFactory.close();}@Testpublic void testSchemaExport() {new SchemaExport(new AnnotationConfiguration().configure()).create(true, true);}}