这个SQL语句应该写在什么地方?是DAOImpl类里面吗?还有,运行这个SQL语句以后返回的是什么东西?是不是还要定义一个类或者接口来存储返回的东西?[/quote]返回的是你需要的三张表的字段,具体根据业务而定[/quote]
比如说这个查询语句:
String hsql="from A as x1, B as x2 where x.Userid='" + userid + "' and x1.Userid = x2.Userid order by id desc";
怎样获得这个查询获得的数据呢?
这个SQL语句应该写在什么地方?是DAOImpl类里面吗?还有,运行这个SQL语句以后返回的是什么东西?是不是还要定义一个类或者接口来存储返回的东西?[/quote]返回的是你需要的三张表的字段,具体根据业务而定[/quote]
比如说这个查询语句:
String hsql="from A as x1, B as x2 where x.Userid='" + userid + "' and x1.Userid = x2.Userid order by id desc";
怎样获得这个查询获得的数据呢?
[/quote]
难道没有A的bean吗?