【发布时间】:2014-07-16 20:25:11
【问题描述】:
需要帮助来创建表是 jdwCustomerTlrdRef 的休眠查询,它应该采用所有 operation_spec = 客户名称。该方法应返回 sysId。
这是要查看的代码。请帮助我,我是这个休眠查询的新手。
公共 getCustomerTlrdRef(BigDecimal sysId) {
System.out.println("---- getAllCustomerTlrdRef " );
String query = "from JdwCustomerTlrdRef as jdwCustomerTlrdRef where jdwCustomerTlrdRef.operation_spec= '+customer_name+'";
Query q = getSessionFactory().getCurrentSession().createQuery(query);
List<JdwCustomerTlrdRef> customerTlrdRefSysId = q.list();
System.out.println(" List size: " + customerTlrdRefSysId.size());
return customerTlrdRefSysId;
}
【问题讨论】: