`

Hibernate备忘录-3

阅读更多

1.自己的经历:

<hibernate-mapping package="com.macrotea.hb.model">
 <class name="Product" table="tb_product">
  <id name="id">
   <column name="AutoID" />
   <generator class="native" />
  </id>
  <property name="name" column="Name">
  </property>
  <!--当有关键字与数据库冲突,如desc,可以通过 column="'desc'",单引号.又听说可以这样:[desc]-->
  <property name="description" column="Description">
  </property>
  <property name="price" column="Price">
  </property>
  <!--多个product对应一个category,CategoryID是表tb_product表的外键名-->
  <many-to-one class="Category" name="category" column="CategoryID">
  </many-to-one>
 </class>
</hibernate-mapping>
<!--<hibernate-mapping package="com.macrotea.hb.model">-->
<!-- <class name="Product" table="tb_product">-->
<!--  <id name="id">-->
<!--   <column name="AutoID" />-->
<!--   <generator class="native" />-->
<!--  </id>-->
<!--  <property name="name">-->
<!--   <column name="Name" />-->
<!--  </property>-->
<!--  <property name="description">-->
<!--   <column name="Description" />-->
<!--  </property>-->
<!--  <property name="price">-->
<!--   <column name="Price" />-->
<!--  </property>-->
<!--  多个product对应一个category,CategoryID是表tb_product表的外键名-->
<!--  <many-to-one class="Category" name="category" >-->
<!--   <column name="CategoryID" />-->
<!--  </many-to-one>-->
<!-- </class>-->
<!--</hibernate-mapping>-->

 

 

2.

 

分享到:
评论

相关推荐

    struts+spring+hibernate3+webligic812环境配置备忘录

    struts+spring+hibernate3+webligic812环境配置备忘录

    angularjs-hibernate-springmvc

    这是一个备忘录, 主要用angjularjs框架写的前台,bootstrap做的页面样式,页面跳转用了angular-ui-router这个模块插件。 后台主要用了springmvc和hibernate。这是我练笔的一个项目,由于时间关系有些功能没做,当中...

    code-memo:代码备忘录, 包含mybatis、spring、spring-boot、hbase、hive、guava、jdk等示例代码

    Code-memo 平时学习的开源框架的示例代码。包括mybatis、spring、spring-boot、hbase、...springboot、jpa、hibernate访问mysql,并提供restful接口 opensource-utils google guaua 使用示例,hbase访问接口以及hbase操

    SSH辅助教学系统jsp开发语言mysql数据库myeclipse设计java编程

    3.管理员用户:登录功能、退出功能、课程管理、作业管理、资料下载管理、选课管理、留言管理、备忘录管理、心得管理、班级管理、学院管理、系管理、教师管理、学生管理,拥有系统 最高权限。 三、注意事项 1、管理...

    the-apache-ignite-book:The Apache Ignite Book的所有代码示例,脚本和更深入的示例。 包括Apache Ignite 2.6或更高版本

    例如,备忘录部分的清单放置在章/ chapter-5 / memoization文件夹中。 这本书是关于什么的? Apache Ignite是使用最广泛的以开源内存为中心的分布式,缓存和处理平台之一。 这使用户可以将该平台用作内存计算框架...

    文明者:文明者-有效管理数据知识的工具

    :hot_beverage: 描述Civilizer是用于笔记或个人知识管理(PKM)的Web应用程序工作所需的知识/专长/技巧/窍门临时备忘录/笔记时间表/计划您经常为琐事而忘记的详细过程例如,在计算机上安装打印机驱动程序,提交纳税...

    java面试题及技巧3

    │ │ │ 275test-3.txt │ │ │ 275test-4.txt │ │ │ 275test.txt │ │ │ answer-1.txt │ │ │ answer-2.txt │ │ │ answer-3.txt │ │ │ answer-4.txt │ │ │ Desktop_.ini │ │ │ 考题_1.doc │ ...

    java面试题以及技巧

    │ │ │ 275test-3.txt │ │ │ 275test-4.txt │ │ │ 275test.txt │ │ │ answer-1.txt │ │ │ answer-2.txt │ │ │ answer-3.txt │ │ │ answer-4.txt │ │ │ Desktop_.ini │ │ │ 考题_1.doc │ ...

    java面试题目与技巧1

    │ │ │ 275test-3.txt │ │ │ 275test-4.txt │ │ │ 275test.txt │ │ │ answer-1.txt │ │ │ answer-2.txt │ │ │ answer-3.txt │ │ │ answer-4.txt │ │ │ Desktop_.ini │ │ │ 考题_1.doc │ ...

    java面试题及技巧4

    │ │ │ 275test-3.txt │ │ │ 275test-4.txt │ │ │ 275test.txt │ │ │ answer-1.txt │ │ │ answer-2.txt │ │ │ answer-3.txt │ │ │ answer-4.txt │ │ │ Desktop_.ini │ │ │ 考题_1.doc │ ...

    java面试题以及技巧6

    │ │ │ 275test-3.txt │ │ │ 275test-4.txt │ │ │ 275test.txt │ │ │ answer-1.txt │ │ │ answer-2.txt │ │ │ answer-3.txt │ │ │ answer-4.txt │ │ │ Desktop_.ini │ │ │ 考题_1.doc │ ...

    基于Java(SSH)+ionic + MySQL实现电子词典APP【100011513】

    后端使用 SSH 框架,用面向对象的分析方法根据需求提出一些模型,将这些模型实现为基本的 Java 对象,然后编写基本的 DAO 接口,采用 Hibernate 架构实现的 DAO 类来实现 Java 类与数据库之间的转换和访问,最后由 ...

    自学oracle存储过程

    关于 Oracle 存储过程的若干问题备忘...........................................................................................4 1. 在 Oracle 中,数据表别名不能加 as。......................................

Global site tag (gtag.js) - Google Analytics