-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Infinite Loop when loading one-to-many set
PostPosted: Wed Feb 21, 2007 9:09 am 
Newbie

Joined: Wed Feb 21, 2007 8:57 am
Posts: 1
Hi all,

I try to load a set defined as a one-to-many relationship between two pajos ending up in an infinite loop as it seems when I make it run.
The logs don't give anything.

Here is the configuration :

<hibernate-mapping>
<class name="gouv.education.gestionAnnuaireInternat.hibernate.generation.ValeurTypologie" table="VALEUR_TYPOLOGIE" schema="DB2INST4">
<id name="oid" type="java.lang.Integer">
<column name="OID" />
<generator class="sequence">
<param name="sequence">val_typo_oid_sequence</param>
</generator>
</id>

<many-to-one name="typologie" class="gouv.education.gestionAnnuaireInternat.hibernate.generation.Typologie" fetch="select">
<column name="OID_TYPO" not-null="true" />
</many-to-one>

<property name="ordre" type="java.lang.Integer">
<column name="ORDRE" />
</property>
<property name="libelle" type="java.lang.String">
<column name="LIBELLE" length="200" not-null="true" />
</property>
<property name="libelleNomen" type="java.lang.String">
<column name="LIBELLE_NOMEN" length="200" />
</property>
</class>
</hibernate-mapping>

-------------------------------------------

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse - Hibernate Tools
-->
<hibernate-mapping>
<class name="gouv.education.gestionAnnuaireInternat.hibernate.generation.Typologie" table="TYPOLOGIE" schema="DB2INST4">
<id name="oid" type="java.lang.Integer">
<column name="OID" />
<generator class="sequence">
<param name="sequence">typo_oid_sequence</param>
</generator>
</id>
<property name="nom" type="java.lang.String">
<column name="NOM" length="100" not-null="true" />
</property>
<set name="valeurTypologies" inverse="true">
<key>
<column name="OID_TYPO" not-null="true" />
</key>
<one-to-many class="gouv.education.gestionAnnuaireInternat.hibernate.generation.ValeurTypologie" />
</set>
</class>
</hibernate-mapping>

-----------------------------------------------------

I try to get the set from the typologie POJO from those lines :


public List getValTypoForTypo(String typologie)
{
List typoList = typologieDAO.findByNom(typologie);

if(typoList.size()==0)
return typoList;


Set set= ((Typologie)(typoList.get(0))).getValeurTypologies();

List list = new ArrayList(set);

return list;
}

-------------------------------------------------------
My environment is Spring 2.0, Hibernate 3.0 Struts 1.2, and the session is opened at the filter level as someone advices elsewhere whith no more luck.
Can anybody help me ?
Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.