| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 590 人关注过本帖
标题:关于左外连接的问题
只看楼主 加入收藏
心动音符
Rank: 1
等 级:禁止访问
威 望:1
帖 子:832
专家分:0
注 册:2005-9-15
收藏
 问题点数:0 回复次数:1 
关于左外连接的问题

--------->我在配置文件Set里用了outer-join=“true”

ArrayList customerfind=((org.hibernate.classic.Session) session).find("from Customer as c");
Customer customerget=(Customer) session.get(Customer.class,new Integer(1));
System.out.println(customerget.toString());
=================执行结果====================
Hibernate:
select
customer0_.id as id0_,
customer0_.name as name0_,
customer0_.home_city as home3_0_,
customer0_.home_street as home4_0_,
customer0_.com_city as com5_0_,
customer0_.com_street as com6_0_
from
customer customer0_
Hibernate:
select
zhiwei0_.customer_id as customer3_1_,
zhiwei0_.id as id1_,
zhiwei0_.id as id1_0_,
zhiwei0_.zhiwei_name as zhiwei2_1_0_,
zhiwei0_.customer_id as customer3_1_0_
from
zhiwei zhiwei0_
where
zhiwei0_.customer_id in (
?, ?, ?
)
1,TOM,shanghai,tonghe.road,shanghai,biejin.road,employee,manager
================================如果要是这么写================================
<<<<<<<第一行给去了>>>>>>>>>>>
Customer customerget=(Customer) session.get(Customer.class,new Integer(1));
System.out.println(customerget.toString());
=================执行结果====================
Hibernate:
select
customer0_.id as id0_1_,
customer0_.name as name0_1_,
customer0_.home_city as home3_0_1_,
customer0_.home_street as home4_0_1_,
customer0_.com_city as com5_0_1_,
customer0_.com_street as com6_0_1_,
zhiwei1_.customer_id as customer3_3_,
zhiwei1_.id as id3_,
zhiwei1_.id as id1_0_,
zhiwei1_.zhiwei_name as zhiwei2_1_0_,
zhiwei1_.customer_id as customer3_1_0_
from
customer customer0_
left outer join
zhiwei zhiwei1_
on customer0_.id=zhiwei1_.customer_id
where
customer0_.id=?
1,TOM,shanghai,tonghe.road,shanghai,biejin.road,employee,manager

??????????????????为什么??????????????????????

搜索更多相关主题的帖子: 配置文件 
2007-03-05 23:32
liuminghui
Rank: 6Rank: 6
等 级:贵宾
威 望:20
帖 子:2882
专家分:0
注 册:2007-1-26
收藏
得分:0 
鼎鼎

海鸽 is My Lover!!
2007-03-07 12:46
快速回复:关于左外连接的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021515 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved