hibernate 配置

Hibernate3.0 采用新的基于ANTLR的HQL/SQL查询翻译器,不过,Hibernate2.1的查询翻译器也依然存在。在Hibernate的配置文件中,hibernate.query.factory_class属性用来选择查询翻译器。例如:
(1)选择Hibernate3.0的查询翻译器:
hibernate.query.factory_class= org.hibernate.hql.ast.ASTQueryTranslatorFactory
(2)选择Hibernate2.1的查询翻译器
hibernate.query.factory_class= org.hibernate.hql.classic.ClassicQueryTranslatorFactory

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
        "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
        "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
 <session-factory>

<!--
  <property name="connection.datasource">EAPT</property>

 

  <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
  <property name="connection.url">jdbc:oracle:thin:@172.29.12.31:1521:eternal</property>
  <property name="connection.username">EADB</property>
  <property name="connection.password">EADB</property>
--> 
  <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
  <property name="connection.url">jdbc:oracle:thin:@localhost:1521:orcl</property>
  <property name="connection.username">EADB</property>
  <property name="connection.password">EADB</property>

 

  <property name="dialect">org.hibernate.dialect.OracleDialect</property>
  <property name="show_sql">false</property>
  <property name="hibernate.query.factory_class">
   org.hibernate.hql.classic.ClassicQueryTranslatorFactory
  </property>

  <mapping resource="com/eapt/vo/EaptAdjustftcreceiveheader.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptAdjustftcreceiveline.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptAgentinvoice.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptAgentinvoiceline.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptArticle.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptArticlerate.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptBankrecord.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptBindarticle.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptCargoplace.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptCustomer.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptCustomeraddress.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptCustomerpaymentinfo.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptCustomerportion.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptCustomerportiontake.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptCustomerrecord.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptDispatchlistappendline.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptDispatchlistheader.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptDispatchlistline.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptDriver.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptExchangerate.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptExpensecategory.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptFee.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptFinancialaccount.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptFinancialaccount1.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptFtcinvoiceheader.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptFtcontractheader.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptFtcontractheader2.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptFtcontractheader4.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptFtcontractheader5.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptFtcontractline.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptLc.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptNtcontractheader.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptNtcontractline.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptPackinglistline.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptPayment.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptPaymentapportion.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptPaytax.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptPoheader.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptPoline.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptPrechargenoticeheader.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptProduct.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptReturnheader.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptReturnline.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptSettleaccount.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptShip.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptShipmessage.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptStock.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptStockin.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptStockinline.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptStockout.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptStockoutline.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptTransfer.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptTransferline.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptVatinvoice.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptVatinvoiceline.hbm.xml" />
  <mapping resource="com/eapt/vo/Employee.hbm.xml" />
  <mapping resource="com/eapt/vo/Operationhistory.hbm.xml" />
  <mapping resource="com/eapt/vo/PubConstant.hbm.xml" />
  <mapping resource="com/eapt/vo/Ratehi.hbm.xml" />
  <mapping resource="com/eapt/vo/Sequencescan.hbm.xml" />
  <mapping resource="com/eapt/vo/PubPermission.hbm.xml" />
  <mapping resource="com/eapt/vo/PubPermissioncategory.hbm.xml" />
  <mapping resource="com/eapt/vo/PubPermissionset.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptAudit.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptMessage.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptDBNotes.hbm.xml" /> 
  <mapping resource="com/eapt/vo/EaptPayFee.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptPayFeeline.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptRelationdoc.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptPoVatInvoice.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptPoVatInvoiceline.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptFinancialpaymentcustomer.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptArrearage.hbm.xml" />
  <mapping resource="com/eapt/vo/EaptVerificationsheet.hbm.xml" />
 </session-factory>
</hibernate-configuration>
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值