Advance thanks and forgiveness for my sad English
selects secondary are executed for entity associate. in this case Org
The query that is executed is as follows :
List usuarios = getHibernateTemplate().findByNamedParam("from User u where upper(u.name)=:name", new String[]{"name"}, new String[]{name.toUpperCase()});
the mapping for this entity is as follows :
<hibernate-mapping>
<class name="User" table="USER">
<comment></comment>
<id name="mat" type="string">
<column name="MAT" length="10" />
</id>
<property name="PUT" type="string">
<column name="PUT" length="50" />
</property>
<many-to-one name="orgi" column="NODO" update="false" insert="false" not-null="true" property-ref="nodo" class="pyuge.model.estructura.Orgi"/>
</class>
</hibernate-mapping>
The result is the following :
two Selects are executed. One for user and one for orgi
it is possible that the entity orgy behave like lazy = true
|