首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

Hibernate annotation 一对多,多对1

2012-10-11 
Hibernate annotation 一对多,多对一???package com.hibernate.testimport org.hibernate.SessionFactory

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);}}

热点排行