Hi,
I've a Rubric class containing a set of Articles declared as lazy with:
Code:
<set
name="articles"
table="article_relrubrics"
lazy="true"
cascade="all"
sort="unsorted"
>
<key column="rubric"/>
<many-to-many class="myPackage.Article" column="article"/>
</set>
when I get a rubric, all contained articles are loaded as well (visible in the log):
Code:
Session session = HibernateUtil.currentSession();
Transaction tx = session.beginTransaction();
Object o = session.get(Rubric.class, new Integer(1));
tx.commit();
HibernateUtil.closeSession();
I don't want the articles to be loaded if not requested to. Any idea what I'm doing wrong to have a lazy set?
Marc.
PS: I use Hibernate 2.1.3 with MySql 4.0.13