I can provide any information you need. Here is generated sql:
Code:
Hibernate: select this.ATTRIBUTE_SET_TYPE_ID as ATTRIBUT1_1_, this.NAME as NAME1_, this.DESCRIPTION as DESCRIPT3_1_, enumeratio1_.ATTRIBUTE_SET_TYPE_ID as ATTRIBUT1___, enumeratio1_.ENUMERATION_ID as ENUMERAT2___, enumeratio2_.ENUMERATION_ID as ENUMERAT1_0_, enumeratio2_.DESCRIPTION as DESCRIPT2_0_, enumeratio2_.NAME as NAME0_ from ATTRIBUTE_SET_TYPE this, MM_ATT_SET_TYPE_ENUM enumeratio1_, ENUMERATION enumeratio2_ where this.NAME=? and this.ATTRIBUTE_SET_TYPE_ID=enumeratio1_.ATTRIBUTE_SET_TYPE_ID(+) and enumeratio1_.ENUMERATION_ID=enumeratio2_.ENUMERATION_ID(+)
Hibernate: select enumeratio0_.ENUMERATION_ID as ENUMERAT4___, enumeratio0_.ENUMERATION_VALUE_ID as ENUMERAT1___, enumeratio0_.ENUMERATION_VALUE_ID as ENUMERAT1_0_, enumeratio0_.NAME as NAME0_, enumeratio0_.DESCRIPTION as DESCRIPT3_0_, enumeratio0_.ENUMERATION_ID as ENUMERAT4_0_ from ENUMERATION_VALUE enumeratio0_ where enumeratio0_.ENUMERATION_ID=?
Hibernate: select enumeratio0_.ENUMERATION_ID as ENUMERAT4___, enumeratio0_.ENUMERATION_VALUE_ID as ENUMERAT1___, enumeratio0_.ENUMERATION_VALUE_ID as ENUMERAT1_0_, enumeratio0_.NAME as NAME0_, enumeratio0_.DESCRIPTION as DESCRIPT3_0_, enumeratio0_.ENUMERATION_ID as ENUMERAT4_0_ from ENUMERATION_VALUE enumeratio0_ where enumeratio0_.ENUMERATION_ID=?
Hibernate: select parameteri0_.ATTRIBUTE_SET_TYPE_ID as ATTRIBUT1___, parameteri0_.PARAMETER_NAME as PARAMETE2___, parameteri0_.PARAMETER_TYPE as PARAMETE3___, parameteri1_.PARAMETER_NAME as PARAMETE1_0_, parameteri1_.PARAMETER_TYPE as PARAMETE2_0_ from MM_ATT_SET_TYPE_PARAM_INFO parameteri0_, PARAMETER_INFO parameteri1_ where parameteri0_.ATTRIBUTE_SET_TYPE_ID=? and parameteri0_.PARAMETER_NAME=parameteri1_.PARAMETER_NAME and parameteri0_.PARAMETER_TYPE=parameteri1_.PARAMETER_TYPE
Hibernate: select enumeratio0_.ENUMERATION_ID as ENUMERAT4___, enumeratio0_.ENUMERATION_VALUE_ID as ENUMERAT1___, enumeratio0_.ENUMERATION_VALUE_ID as ENUMERAT1_0_, enumeratio0_.NAME as NAME0_, enumeratio0_.DESCRIPTION as DESCRIPT3_0_, enumeratio0_.ENUMERATION_ID as ENUMERAT4_0_ from ENUMERATION_VALUE enumeratio0_ where enumeratio0_.ENUMERATION_ID=?
here is hbm.xml file for Attribute_set_Type class:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<class
name="com.biofrontera.discovery.hibernate.AttributeSetType"
table="ATTRIBUTE_SET_TYPE"
>
<id
name="attributeSetTypeId"
type="java.lang.Long"
column="ATTRIBUTE_SET_TYPE_ID"
>
<generator class="sequence">
<param name="sequence">SQ_ATTRIBUTE_SET_TYPE</param>
</generator>
</id>
<property
name="name"
type="java.lang.String"
column="NAME"
not-null="true"
unique="true"
length="50"
>
</property>
<property
name="description"
type="java.lang.String"
column="DESCRIPTION"
not-null="true"
length="200"
>
</property>
<!-- Associations -->
<!-- uni-directional many-to-many association to Enumeration -->
<set
name="enumerations"
lazy="false"
outer-join="true"
cascade="none"
table="MM_ATT_SET_TYPE_ENUM"
>
<key>
<column name="ATTRIBUTE_SET_TYPE_ID" />
</key>
<many-to-many
class="com.biofrontera.discovery.hibernate.Enumeration"
>
<column name="ENUMERATION_ID" />
</many-to-many>
</set>
<!-- uni-directional many-to-many association to ParameterInfo -->
<set
name="parameterInfos"
lazy="false"
cascade="none"
table="MM_ATT_SET_TYPE_PARAM_INFO"
>
<key>
<column name="ATTRIBUTE_SET_TYPE_ID" />
</key>
<many-to-many
class="com.biofrontera.discovery.hibernate.ParameterInfo"
>
<column name="PARAMETER_NAME" />
<column name="PARAMETER_TYPE" />
</many-to-many>
</set>
</class>
</hibernate-mapping>
if I remove "outer-join="true"" for enumerations association only one record will be returned (as it should).
There is only one record in the ATTRIBUTE_SET_TYPE table. There are 3 corresponding entries in the Enumeration table.
Also I use the following params:
use_outer_join=true
hibernate.max_fetch_depth=3
hibernate.dialect=net.sf.hibernate.dialect.Oracle9Dialect