hello,
I was wondering if there was a way to generate inner join instead of outer join for getting sub objects.
I have a class User and a class Group. One user is necessairly in a group and a group can have more than one user.
My pleasure would be to generate almost this :
select * from user, group where user.grp = group.grp
my mapping is the following :
Code:
<hibernate-mapping>
<class name="com.unimondes.model.User" table="T_USER">
<id name="idUser" unsaved-value="null">
<column name="USR_ID" sql-type="long" not-null="true" />
<generator class="native">
<param name="sequence">seq_usr_id</param>
</generator>
</id>
<property name="login" column="USR_LOGIN" />
<property name="password" column="USR_PASSWORD" />
<many-to-one name="group" class="com.unimondes.model.Group" column="GRP_ID" not-null="true" />
</class>
<class name="com.unimondes.model.Group" table="T_GROUP">
<id name="idGroup" unsaved-value="null">
<column name="GRP_ID" sql-type="long" not-null="true" />
<generator class="native">
<param name="sequence">seq_grp_id</param>
</generator>
</id>
<property name="name" column="GRP_NAME" />
</class>
</hibernate-mapping>
May I do better ???
Thx in advance