【SSH】hibernate的源資料配置檔案**.hbm.xml中的entity-name屬性一定要用完整類名,即使你用了包!!
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> <hibernate-mapping package="indi.domain"> <class name="Function" table="auth_function"> <id name="id" type="java.lang.String"> <column name="id" length="32" /> <generator class="assigned" /> </id> <many-to-one name="parentFunction" class="Function" fetch="select"> <column name="pid" length="32" /> </many-to-one> <property name="name" type="java.lang.String"> <column name="name" /> </property> <property name="code" type="java.lang.String"> <column name="code" /> </property> <property name="description" type="java.lang.String"> <column name="description" /> </property> <property name="page" type="java.lang.String"> <column name="page" /> </property> <property name="generatemenu" type="java.lang.String"> <column name="generatemenu" /> </property> <property name="zindex" type="java.lang.Integer"> <column name="zindex" /> </property> <set name="roles" inverse="true" table="role_function" > <key> <column name="function_id" length="32" not-null="true" /> </key> <!-- entity-name要輸入完整類名,即使用了包! --> <many-to-many entity-name="indi.domain.Role"> <column name="role_id" length="32" not-null="true" /> </many-to-many> </set> <set name="children" inverse="true"> <key> <column name="pid" length="32" /> </key> <one-to-many class="Function" /> </set> </class> </hibernate-mapping>
相關推薦
【SSH】hibernate的源資料配置檔案**.hbm.xml中的entity-name屬性一定要用完整類名,即使你用了包!!
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://ww
【Highchart】自定義儀表盤配置檔案,儀表盤分段及漸變色
highchart配置出儀表盤 chart: { type: 'gauge', plotBackgroundColor: null, plotBackgroundImage: null, plotBorderWi
【Linux】/etc/mail.rc 配置檔案(原)/ 騰訊企業郵箱配置檔案
原配置說明文件===========# This is the configuration file for Heirloom mailx (formerly # known under the name "nail". # See mailx(1) for further
【SpringBoot】SpringBoot之入門配置檔案
介紹:example02 相信很多人選擇Spring Boot主要是考慮到它既能兼顧Spring的強大功能,還能實現快速開發的便捷。我們在Spring Boot使用過程中,最直觀的感受就是沒有了原來自己整合Spring應用時繁多的XML配置內容,替代它的是在p
【SSH】——Hibernate三種狀態之間的轉化
Hibernate的三種狀態為:transient、persistent和detached。對這三種狀態的理解可以結合Session快取,在Session快取中的狀態為persistent,另外兩種不在Session中。 另一種說法是,Hibernate
【SSH】——Hibernate(3)實體對映
實體對映技術作為類與表之間的聯絡紐帶,在ORM實現中起著至關重要的作用,對於我們而言,對映關係更多的體現在配置檔案的維護過程中。 ORM的實現思想就是將關係資料庫中表的資料對
【SSH】Hibernate中DetachedCriteria設定關聯屬性的查詢條件和獲取關聯屬性結果集的倆個問題!
問題一:Hibernate設定關聯屬性的查詢條件如果我們想要在離線DetachedCriteria中設定物件的關聯屬性物件的非外來鍵屬性的查詢條件,那麼要為關聯屬性設定一個別名!!注意:如果查詢的就是關
hibernate ---MySQL 資料庫 配置的 hbm.xml 檔案例子
<?xml version="1.0" encoding="utf-8"?> <!-- 對映檔案需要一個dta來指定格式 --> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernat
spring、hibernate整合核心配置檔案applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w
mybatis配置檔案mapper.xml中trim標籤的用法
在mapper.xml中對statement的定義,可以用<trim>來填充和隱藏sql語句。 <!--修改user的statement--><update id="updateUser" parameterType="user">update user <
Spring中配置檔案application xml中各配置的含義
分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!  
關於maven配置檔案setting.xml中的配置
前面已經講解了配置nexus共享倉庫。啟動了nexus服務後,本地倉庫下載jar包都是從nexus裡下載,如果nexus裡沒有,nexus會與maven的中央倉庫打交道,然後下載對應的依賴包。當關閉了nexus服務後,本地倉庫就會跳過nexus,直接去maven中央倉庫下
springmvc配置檔案web.xml中/與/*的區別
<!-- 配置springmvc的 DispatcherServlet ctrl+alt+向上鍵 --><servlet><servlet-name>springDispatcherServlet</servlet-name>
Spring中配置檔案application.xml中各配置的含義
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/
Hibernate中對映檔案*.hbm.xml中type="date"和不寫type="date"的區別?
原文地址:http://blog.csdn.net/u013456370/article/details/51194650 在hibernate中對映檔案*.hbm.xml中type="date"和不寫type="date"的區別: 第一種:type="date"
mybatis配置檔案conf.xml中的environment詳解
在這篇文章中,我們接著前文繼續往下看其他的配置元素,今天的主角就是我們的<environments>元素,該元素用於對我們需要訪問的資料庫配置進行設定,我們先來看一下配置: <environments default="development"
【SSH】Struts2配置檔案學習
在Web開發專案中,都是使用web.xml來實現MVC框架的應用,如果要使用Struts的MVC模式,我們就必須在Web.xml中對Struts2進行配置,然後使用Struts.xml來
【Linux】Linux統計資料夾、檔案數量的命令
# 檢視當前目錄下的檔案數量(不包含子目錄中的檔案) ls -l|grep "^-"| wc -l # 檢視當前目錄下的檔案數量(包含子目錄中的檔案) 注意:R,代表子目錄 ls -lR|grep "^-"| wc -l # 檢視當前目錄下的資料夾目錄個數(不包含
【python】儲存某個資料夾下所有圖片名字到一個txt檔案裡
用python實現讀取某一資料夾下的所有圖片名字到一個txt檔案 import os dir1='/data/Datasets/JPEGImages'#圖片檔案存放地址 txt1 = '/data/Datasets/picture.txt'#圖片檔名存放txt檔案地址 f1 = open
【整理】eclipse.ini/myeclipse.ini檔案中引數配置【zz】
今天下午查了一些關於優化MyEclipse速度的文章,受益匪淺。不過知其然也要知其所以然。比如說在提到通過修改myeclipse.ini檔案中引數-Xms,-Xmx,-PerSize的值時,這幾個引數具體是指什麼?在網上搜集了一些資料,現整理如下: 這涉及到JVM的