Joined: Thu Sep 18, 2003 3:34 am Posts: 9
|
I have a model where AttributeValue is related to Attribute using many-to-one one-direction relation. When I load AttributeValue instance hibernate fetches also related Attribute entity (I see it from sql logging). How can I disable it? I load it by:
session.load(AttributeValue.class, new Integer(1));
Here are my class mappings:
<class
name="pl.ken.shop.model.AttributeValue"
dynamic-update="false"
dynamic-insert="false"
>
<id
name="id"
column="ID_AttributeValue"
type="java.lang.Integer"
length="8"
>
<generator class="increment">
</generator>
</id>
<property
name="value"
type="java.lang.String"
update="true"
insert="true"
column="value"
/>
<many-to-one
name="attribute"
class="pl.ken.shop.model.Attribute"
outer-join="false"
column="ID_Attribute"
not-null="false"
/>
</class>
<class
name="pl.ken.shop.model.Attribute"
dynamic-update="false"
dynamic-insert="false"
>
<id
name="id"
column="ID_Attribute"
type="java.lang.Integer"
length="8"
>
<generator class="increment">
</generator>
</id>
<property
name="description"
type="java.lang.String"
update="true"
insert="true"
column="description"
/>
<property
name="name"
type="java.lang.String"
update="true"
insert="true"
column="name"
/>
<property
name="position"
type="int"
update="true"
insert="true"
column="position"
/>
</class>
|
|