日期:2014-05-16  浏览次数:20437 次

jsf+spring+hibernate数据操作问题。急
我用jsf+spring+hibernate做了一个登录
老是提示
Hibernate operation: could not execute query; bad SQL grammar [select account0_.accountid as accountid, account0_.username as username0_, account0_.password as password0_ from login.account account0_ where account0_.username=? and account0_.password=?]; nested exception is java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]对象名 'login.account' 无效。

这是我的DAO的代码
引用

public Account getUser(final Account account) {

String hql = "from Account a where a.username = ? and a.password = ?";
List list = getHibernateTemplate().find(hql, new Object[]{account.getUsername(),account.getPassword()});

if(null == list || 0 == list.size()){
return null;
}
return (Account)list.get(0);
}

很奇怪不知道哪里有问题了