hibernate的xml配置中<class table="ADDRESS" lazy="false"对应的annotation配置
2010-07-13 11:41
337 查看
在hibernate中,如果在xml配置文件中配置了<class table="ADDRESS" lazy="false" name="xxx.dao.impl.Address">,这里的lazy=false对应的annotation配置为@org.hibernate.annotations.Proxy(lazy = false)
其他的一些对应包括:
<property name="updatedDate" type="java.sql.Timestamp" access="field">
@org.hibernate.annotations.Type(type = "java.sql.Timestamp")
<many-to-one fetch="join" outer-join="true" column="CHANNEL" access="field" name="channel" insert="false" update="false"/>
@Fetch
<column name="QUANTITY" sql-type="NUMBER(5)" not-null="false"/>
@Type
参考文章《lazy in annotations from xml》,通过Google "hibernat annotation lazy"找到。:)
其他的一些对应包括:
<property name="updatedDate" type="java.sql.Timestamp" access="field">
@org.hibernate.annotations.Type(type = "java.sql.Timestamp")
<many-to-one fetch="join" outer-join="true" column="CHANNEL" access="field" name="channel" insert="false" update="false"/>
@Fetch
<column name="QUANTITY" sql-type="NUMBER(5)" not-null="false"/>
@Type
参考文章《lazy in annotations from xml》,通过Google "hibernat annotation lazy"找到。:)
相关文章推荐
- Hibernate实体类映射文件demo.hbm.xml 中的<generator class="?"></generator>的不同属性含义
- hibernate的<class name=" " table=" " schema=" "> 中schema的问题
- hibernate中配置<param name="sequence">SEQ_CLASS_ID</param>
- hibernate中配置<param name="sequence">SEQ_CLASS_ID</param>
- 配置错误<location allowOverride="false">
- hibernate.cxf.xml 配置文件 解决 内容必须匹配 "(property*,mapping*,(class-cache|collection-cache)*,event*,listener*)"
- Hibernate 的<generator class="native"></generator>的不同属性含义
- Spring的配置文件applicationContext.xml中的 <context:component-scan base-package="com.orm" />
- Hibernate 的<generator class="native"></generator>的不同属性含义
- applicationContext.xml配置文件提示:class "org.apache.commons.dbcp.BasicDataSource" not found
- Hibernate 的<generator class="native"></generator>的不同属性含义
- Hibernate 的<generator class="">的不同属性含义
- 很重要!!!ssh集成的时候struts2 和 spring3集成一定要在struts.xml文件里配置!<constant name="struts.objectFactory" value="sp
- hibernate 单向关联一对一 lazy="false"
- 怎么在web.xml中配置一个<filter>对应多个<filter-mapping>
- struts.xml配置文件中result的语法:<result name="" type="">xxxxx</result>
- tomcat中的server.xml中的配置文件中<Host appBase="webaps"修改appBase引起的路问题
- Hibernate逍遥游记-第7章 Hibernate的检索策略和检索方式(<set lazy="false" fetch="join">、left join fetch、FetchMode.JOIN、)
- Spring 配置中的 default-lazy-init="false"详解
- hibernate.cxf.xml 配置文件 解决 内容必须匹配 "(property*,mapping*,(classcachecollectioncache)*,event*,listener*)