hibernate映射文件
来源:互联网 发布:天猫魔盒软件官方网站 编辑:程序博客网 时间:2024/05/16 16:02
当希望hibernate用update方法更新的时没改动过的字段就不更新,而不是全部更新,hibernate update的时候是全部字段更新的:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<!--方式一:在class里添加属性dynamic-update="true" 这是最好的方法推荐使用-->
<class name="com.model1.Student" table="STUDENT" dynamic-update="true">
<id name="id" type="java.lang.Integer"><column name="ID" />
<generator class="identity"></generator>
</id>
<property name="name" column="NAME"></property>
<property name="age" column="AGE"></property>
<!--方式二:给该字段加 update="false"即可 注解:@column(updatable=false) 此方法不灵活被注解的字段永远update不了-->
</class>
</hibernate-mapping>
- Hibernate映射文件 lazy?
- Hibernate映射文件 Inverse?
- Hibernate映射文件 Cascade?
- Hibernate映射文件详解
- hibernate映射文件
- hibernate映射文件配置
- Hibernate 映射文件详解
- Hibernate Map映射文件
- Hibernate List映射文件
- Hibernate映射文件配置
- hibernate映射文件配置
- hibernate映射文件
- Hibernate 映射文件详解
- Hibernate 映射文件详解
- Hibernate映射文件
- hibernate 找不到映射文件
- hibernate 映射文件
- hibernate映射文件
- Microsoft Enterprise Library 5.0 系列教程(八) Unity Dependency Injection and Interception
- JavaScript收藏~From 脚本之家
- 欧几里德算法--求最大公约数
- Microsoft Enterprise Library 5.0 系列教程(九) Policy Injection Application Block
- 微软云技术Windows Azure专题(四):如何利用Mobile Service的计划程序连接到Service Bus定时推送消息
- hibernate映射文件
- PRML Chapter 9.2 Mixtures of Gaussians 混合高斯分布简介
- 华为C8815 ROOT 成功
- Microsoft Enterprise Library 5.0 系列教程(十) Configuration Application Block
- 如何开发安卓新闻客户端?
- 有一段时间没写了
- poj 3604 Professor Ben 因子
- 新视野OJ 2818: Gcd
- the different of IE and Chrome when return the color style