lishunli / nutz

Automatically exported from code.google.com/p/nutz
0 stars 0 forks source link

自定义sql关联查询返回的结果不能自动封装实体 #179

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
希望可以:
select a.*,b.* from A as a,B as b where a.id=b.a_id
或
向hibernate的自定义sql那样做也可以

将结果按关联关系动态封装到实体里或封装到数组中。

Original issue reported on code.google.com by axh...@gmail.com on 11 May 2010 at 3:20

GoogleCodeExporter commented 9 years ago
反对!

这种写法,只会使Nutz变得非常复杂, 
因为需要一套类似AST的解析.
而且, 这还需要使用者学会Nutz特殊SQL的语法(就像HQL).

严重反对!

Original comment by wendal1985@gmail.com on 11 May 2010 at 4:00

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
hibernate的自定义sql是hql?
我上面的意思是自定义sql查询结果希望能根据关联关系自动��
�装在pojo中。

反对无效!

Original comment by axh...@gmail.com on 11 May 2010 at 11:55

GoogleCodeExporter commented 9 years ago
也许我没理解好,或者你表达得有问题.
^_^

暂时沉默

Original comment by wendal1985@gmail.com on 12 May 2010 at 1:10

GoogleCodeExporter commented 9 years ago
呵呵
二者皆有。

Original comment by axh...@gmail.com on 12 May 2010 at 9:05

GoogleCodeExporter commented 9 years ago
上面的例子,希望被封装成一个什么样的 POJO 呢?

Original comment by zozoh...@gmail.com on 13 May 2010 at 6:51

GoogleCodeExporter commented 9 years ago

Original comment by wendal1985@gmail.com on 13 May 2010 at 10:25

GoogleCodeExporter commented 9 years ago
Sql: 如果使用复杂的关联查询sql, queryEntity 
方法无法正常封装为一个pojo

Original comment by 9yong8y...@gmail.com on 26 Jul 2010 at 3:26

GoogleCodeExporter commented 9 years ago
自己写一个回调就好了呗
这个 Issue 没人管,我就关了哦

Original comment by zozoh...@gmail.com on 15 Jul 2011 at 3:46

GoogleCodeExporter commented 9 years ago
回调就能解决问题.

Original comment by wendal1985@gmail.com on 30 Jan 2012 at 8:39