【发布时间】:2015-03-15 15:28:55
【问题描述】:
我想使用 join 进行查询,我测试过但我有这个错误
org.hibernate.hql.ast.QuerySyntaxException: 意外令牌..
我做到了:
public List <Card>getCard(Client c) {
ClientDAO cd = new ClientDAO();
List<Card> ca = getSessionFactory().getCurrentSession().createQuery("select ca.column1,e.column2 from card ca join ens e on ca.ide=e.ide where ca.idclient="+ cd.getClient(c).getIdclient()).list();//this is a method to get the current client
return ca;
【问题讨论】:
标签: java database hibernate join orm