hibernate 3

来源:互联网 发布:不锈钢腰带 淘宝搜索 编辑:程序博客网 时间:2024/04/29 13:54

 HibernateTools

<taskdef name="hbm2java" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="project.class.path" />

<target name="codegen" description="Generate Java source from the O/R mapping files">
<hbm2java destdir="${source.root}">
  <configuration>
    <fileset dir="${source.root}">
     <include name="**/*.hbm.xml" />
    </fileset>
  </configuration>
  <hbm2java />

</hbm2java>
</target>

 

net.sf.hibernate-->org.hibernate

Hibernate Mapping DTD 2.0-->Hibernate Mapping DTD 3.0

int size = ((SessionFactoryImpl)(session.getSessionFactory())).getSettings().getJdbcBatchSize();

int size = ((Integer) session.createQuery(hql).iterate().next()).intValue();

原创粉丝点击