---
title: "初学hibernate,遇到了一个菜菜的问题.google解决"
author: "cui09"
date: "2007-03-07T16:07:37Z"
tags: []
slug: "hibernate-google"
draft: false
lastmod: "2007-03-07T16:07:37Z"
id: 58000
url: "https://cui.iteye.com/blog/58000"
---

在daos中的对数据操作中sql中表的名字要和对应的实体类名字一样才可以。

pojo的名字为Sctype.java.那么sql 就得这样写from Sctype.而不能是from sctype.

Query query = session.createQuery("from Sctype");