Home > Database > Mysql Tutorial > mysql-Hibernate 原生sql多表查询在Linux服务器上查询不到数据

mysql-Hibernate 原生sql多表查询在Linux服务器上查询不到数据

WBOY
Release: 2016-06-06 09:36:19
Original
1324 people have browsed it

mysqllinux服务器

String sql = "SELECT Area.* FROM area AS Area,district AS d WHERE Area.districtid=d.districtid AND Area.areaname= '"
+ areaname + "' AND d.districtname='" + cityname + "'";
@SuppressWarnings("unchecked")
List as = (List) getCurrentSession()
.createSQLQuery(sql).addEntity("Area",Area.class).list();

<code></code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template