---
title: "Valuelist中 hsql使用select 子句的情况  (hibernate3.12)"
author: "baizheng"
date: "2006-03-21T13:48:00Z"
tags: ["Gmail", "PHP"]
slug: "valuelist-hsql-select-hibernate3-12"
draft: false
lastmod: "2006-03-21T13:48:00Z"
id: 36845
url: "https://baizheng.iteye.com/blog/36845"
---

想要支持hibernate3.12的valuelist的可以发邮件到 bzshow 在 gmail

 

select new com.sina.model.TopPubInfo(info.studentAccount.username,info.teacherSex) from PublishInfo info order by info.publishTime desc

其中定义如下

public class TopPubInfo {

```
   /** identifier field */   protected String name;
```

```
   protected byte teacherSex;      
```

/\** * @return Returns the name. \*/ public String getName() { return name; } /\** * @param name The name to set. \*/ public void setName(String name) { this.name = name; } /\** * @return Returns the teacherSex. \*/ public byte getTeacherSex() { return teacherSex; } /\** * @param teacherSex The teacherSex to set. \*/ public void setTeacherSex(byte teacherSex) { this.teacherSex = teacherSex; } /\** * @param name * @param teacherSex \*/ public TopPubInfo(String name, byte teacherSex) { super(); this.name = name; this.teacherSex = teacherSex; } }

取自"[http://localhost/wiki/index.php/Valuelist%E4%B8%AD\_hsql%E4%BD%BF%E7%94%A8select\_%E5%AD%90%E5%8F%A5%E7%9A%84%E6%83%85%E5%86%B5](http://localhost/wiki/index.php/Valuelist%E4%B8%AD_hsql%E4%BD%BF%E7%94%A8select_%E5%AD%90%E5%8F%A5%E7%9A%84%E6%83%85%E5%86%B5)"