两个表,一个是user表,一个account表,前者对后者是一对多关系
CREATE TABLE `t_account` (
  `account_id` int(11) NOT NULL AUTO_INCREMENT,
  `cardNumber` varchar(20) NOT NULL,
  `balance` double NOT NULL,
  `begin_balance` double NOT NULL,
  `begin_balance_time` datetime NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`account_id`),
  UNIQUE KEY `cardNumber` (`cardNumber`),
  KEY `FK75657D627F0CBB0E` (`user_id`),
  CONSTRAINT `FK75657D627F0CBB0E` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
CREATE TABLE `t_user` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password` varchar(50) NOT NULL,
  `realname` varchar(50) NOT NULL,
  `telephone` varchar(20) NOT NULL,
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `username` (`username`),
  UNIQUE KEY `telephone` (`telephone`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
现在我要查account表中的制定user_id 的所有account记录,我写的HQL语句是这样的。
from Account as a where " + "a.user_id=?", id为什么不行?
出现如下的错误
Messages: could not resolve property: user_id of: cn.hnust.luo.EBank.domain.Account [from cn.hnust.luo.EBank.domain.Account as a where a.user_id=?] 
could not resolve property: user_id of: cn.hnust.luo.EBank.domain.Account [from cn.hnust.luo.EBank.domain.Account as a where a.user_id=?]; nested exception is org.hibernate.QueryException: could not resolve property: user_id of: cn.hnust.luo.EBank.domain.Account [from cn.hnust.luo.EBank.domain.Account as a where a.user_id=?]  请帮忙看看怎么解决