-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem generating an inner join
PostPosted: Wed Oct 04, 2006 5:53 am 
Newbie

Joined: Wed Oct 04, 2006 5:43 am
Posts: 3
Hi All

Using Hibernate for the first time and I'm having some teething problems...

Mapping document 1
=============

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="com.lmig.pal.pcm.cargo">

<class name="TCMClaimCenterGroupCargo"
table="CC_GROUP"
mutable="false">

<id name="id"
type="java.lang.Integer"
column="ID"
unsaved-value="null">
<generator class="assigned"/>
</id>

<many-to-one name="lmOfficeCodeType"
class="TCMClaimCenterLmGroupTypeCargo"
column="LMOFFICECODETYPE"
cascade="all"
unique="true"
fetch="join"
lazy="false"/>

<property name="groupType" type="java.lang.Integer" column="GROUPTYPE" />

<property name="lmOfficeCode" type="java.lang.String" column="LMOFFICECODE" />
<property name="publicId" type="java.lang.String" column="PUBLICID" />
<property name="name" type="java.lang.String" column="NAME" />
<property name="lmOfficeAddressLine2" type="java.lang.String" column="LMOFFADDRESSLINE2" />
<property name="lmOfficeCountry" type="java.lang.String" column="LMOFFCOUNTRY" />
<property name="lmOfficeName" type="java.lang.String" column="LMOFFICENAME" />
<property name="lmOfficePostalCode" type="java.lang.String" column="LMOFFPOSTALCODE" />
<property name="lmOfficePhone" type="java.lang.String" column="LMOFFPHONE" />
<property name="lmOfficeCity" type="java.lang.String" column="LMOFFCITY" />
<property name="lmOfficeCityDenorm" type="java.lang.String" column="LMOFFCITYDENORM" />
<property name="lmOfficeAddressLine1" type="java.lang.String" column="LMOFFADDRESSLINE1" />

</class>

</hibernate-mapping>


Mapping Document 2
==============

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="com.lmig.pal.pcm.cargo">

<class name="TCMClaimCenterLmGroupTypeCargo"
table="CCTL_LMOFFICECODETYPE"
mutable="false">

<id name="id"
type="java.lang.Integer"
column="ID"
unsaved-value="null">
<generator class="assigned"/>
</id>

<property name="priority" type="java.lang.Integer" column="PRIORITY" />
<property name="name" type="java.lang.String" column="NAME" />
<property name="description" type="java.lang.String" column="DESCRIPTION" />
<property name="typeCode" type="java.lang.String" column="TYPECODE" />
<property name="retired" type="java.lang.String" column="RETIRED" />

</class>

</hibernate-mapping>


Problem
======

My many-to-one association is generating an outer left join (I turned on show_sql to verify this) but I want it to generate an inner join - completely at a loss how to do this. I've tried looking at Hibernate in Action and looking at this forum but haven't had any luck.

Can anyone help me?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.