---
title: "hql中怎样在where子句中指定查询的子类"
author: "fourfire"
date: "2009-05-14T17:52:54Z"
tags: []
slug: "hql-where"
draft: false
lastmod: "2009-05-14T17:52:54Z"
id: 386969
url: "https://fourfire.iteye.com/blog/386969"
---

采用单表存储类的继承关系
A的子类是A1、A2、A3,我想通过hql检索A1、A2的记录，hql如何写？