---
title: "hibernate4 代替hibernate3 的Hibernate.INTEGER的用法"
author: "xiaokun"
date: "2012-12-25T10:40:37Z"
tags: []
categories: ["开源软件"]
slug: "hibernate4-hibernate3-hibernate-integer"
draft: false
lastmod: "2012-12-25T10:40:37Z"
id: 1753660
url: "https://xiaokun.iteye.com/blog/1753660"
---

hibernate4 替代hibernate3 的Hibernate.INTEGER的用法
hibernate3 中没有了Hibernate.INTEGER的用法

在Hibernate4中使用的方法是 StandardBasicTypes.INTEGER用法

例如：sqlQuery.addScalar("id",StandardBasicTypes.INTEGER);