codecamp

持久层注解-JPA支持

JPA全称Java Persistence API,是java 环境提供的ORM映射api。本框架提供了JPA映射支持,默认情况下是不启用的。

在配置文件myhibernate.properties中添加配置以启用

org.myhibernate.core.Mappings.jpaEnable=true


然后就可以使用或支持jpa配置的table和column映射了,示例如下

import javax.persistence.Column;
import javax.persistence.Table;
@Table(name="test_product")
public class Product 
{
	private String id="";
	
	@Column(name="username")
	private String name="";

	
}



持久层注解-MapProperty
多数据源的使用
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }