Hibernate version:
3.1
Mapping documents:
<join table="POSTS_TEXT" fetch="select">
<key column="POST_ID"/>
<property name="subject" column="POST_SUBJECT" type="string" not-null="false" />
<property name="text" column="POST_TEXT" type="com.netg.forums.dao.hibernate.util.BlobType" not-null="true" />
</join>
The generated SQL (show_sql=true):
select
post0_.POST_ID as POST1_20_,
post0_.POSTER_IP as POSTER2_20_,
post0_.POST_TIME as POST3_20_,
post0_.POST_EDIT_COUNT as POST4_20_,
post0_.POST_EDIT_TIME as POST5_20_,
post0_.NEED_CONTENT_REVIEW as NEED6_20_,
post0_.CONTENT_REVIEWED as CONTENT7_20_,
post0_.NEED_MODERATE as NEED8_20_,
post0_.USER_ID as USER9_20_,
post0_.TOPIC_ID as TOPIC10_20_,
post0_1_.POST_SUBJECT as POST2_22_,
post0_1_.POST_TEXT as POST3_22_
from
POSTS post0_ inner join POSTS_TEXT post0_1_ on post0_.POST_ID=post0_1_.POST_ID
where
(post0_.USER_ID=? )
As you can see, hibernate is using inner join regardless of my specifying select in the mapping. Any ideas?
|