-->
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.  [ 14 posts ] 
Author Message
 Post subject: One-To-One trouble
PostPosted: Wed Mar 17, 2004 9:50 am 
Newbie

Joined: Wed Mar 17, 2004 9:32 am
Posts: 6
Location: Nantes (France)
Hi !

I got some troubles with load(Class, Id) method.
My mapping :
- 1 "mother" class
- n "child" classes

my n children are linked with the mother class with a one-to-one association. Only one child exist. PK of child equals mother's PK (usage of FK for PK).
When I load my mother class, Hibernate make n query (with 20 child it's a little bit too much). I would like to use the Lazy mode for this relations, doing only one query, loading children only when I want but it looks to be impossible with one-to-one associations...

Thanks in advance for your help,

LeKoala.

PS / sorry for my poor english...

Version : 2.1.2
Database : Oracle 9i

Mapping docs :
<?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>
<!--
Created by the Middlegen Hibernate plugin

http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->

<class
name="i2.application.trafic2000.cp.Message"
table="MESSAGE"
>

<id
name="idMessage"
type="java.lang.Long"
column="ID_MESSAGE"
>
<generator class="sequence">
<param name="sequence">S_ID_MESSAGE</param>
</generator>
</id>

<property
name="numReception"
type="java.lang.Integer"
column="NUM_RECEPTION"
length="5"
/>

<property
name="numVersion"
type="java.lang.Integer"
column="NUM_VERSION"
length="5"
/>
<property
name="dateReceptionEmission"
type="java.sql.Timestamp"
column="DATE_RECEPTION_EMISSION"
length="7"
/>
<property
name="dateMaj"
type="java.sql.Timestamp"
column="DATE_MAJ"
length="7"
/>
<property
name="laRefId"
type="java.lang.String"
column="LA_REF_ID"
length="40"
/>
<property
name="msRefId"
type="java.lang.String"
column="MS_REF_ID"
length="40"
/>
<property
name="testId"
type="java.lang.String"
column="TEST_ID"
length="8"
/>
<property
name="versionProtocole"
type="java.lang.String"
column="VERSION_PROTOCOLE"
length="4"
/>

<!-- associations -->
<!-- bi-directional many-to-one association to EnumTypeMsg -->
<many-to-one
name="enumTypeMsg"
class="i2.application.trafic2000.cp.EnumTypeMsg"
not-null="true"
>
<column name="TYPE_MSG" />
</many-to-one>
<!-- bi-directional many-to-one association to EnumFlotteur -->
<many-to-one
name="enumFlotteur"
class="i2.application.trafic2000.cp.EnumFlotteur"
not-null="true"
>
<column name="FLOTTEUR" />
</many-to-one>
<!-- bi-directional one-to-one association to CaracteristiquesNavire -->
<one-to-one
name="caracteristiquesNavire"
class="i2.application.trafic2000.cp.CaracteristiquesNavire"
outer-join="auto"
/>
<!-- bi-directional one-to-one association to MsgMs2ssnHazmatReq -->
<one-to-one
name="msgMs2ssnHazmatReq"
class="i2.application.trafic2000.cp.MsgMs2ssnHazmatReq"
outer-join="false"
/>
<!-- bi-directional one-to-many association to Voyage -->
<set
name="voyagesByIdMessageMouv"
lazy="true"
inverse="true"
>
<key>
<column name="ID_MESSAGE_MOUV" />
</key>
<one-to-many
class="i2.application.trafic2000.cp.Voyage"
/>
</set>
<!-- bi-directional one-to-many association to Voyage -->
<set
name="voyagesByIdMessagePos"
lazy="true"
inverse="true"
>
<key>
<column name="ID_MESSAGE_POS" />
</key>
<one-to-many
class="i2.application.trafic2000.cp.Voyage"
/>
</set>
<!-- bi-directional one-to-one association to MsgNote -->
<one-to-one
name="msgNote"
class="i2.application.trafic2000.cp.MsgNote"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgOperation -->
<one-to-one
name="msgOperation"
class="i2.application.trafic2000.cp.MsgOperation"
outer-join="false"
/>
<!-- bi-directional one-to-one association to Msg24hp -->
<one-to-one
name="msg24hp"
class="i2.application.trafic2000.cp.Msg24hp"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgSsn2msHazmatRes -->
<one-to-one
name="msgSsn2msHazmatRe"
class="i2.application.trafic2000.cp.MsgSsn2msHazmatRes"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgMs2ssnSecurityReq -->
<one-to-one
name="msgMs2ssnSecurityReq"
class="i2.application.trafic2000.cp.MsgMs2ssnSecurityReq"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgSsn2msAlertRes -->
<one-to-one
name="msgSsn2msAlertRe"
class="i2.application.trafic2000.cp.MsgSsn2msAlertRes"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgSsn2msShipRes -->
<one-to-one
name="msgSsn2msShipRe"
class="i2.application.trafic2000.cp.MsgSsn2msShipRes"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgLibre -->
<one-to-one
name="msgLibre"
class="i2.application.trafic2000.cp.MsgLibre"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgSsn2msSecurityReq -->
<one-to-one
name="msgSsn2msSecurityReq"
class="i2.application.trafic2000.cp.MsgSsn2msSecurityReq"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgEvenement -->
<one-to-one
name="msgEvenement"
class="i2.application.trafic2000.cp.MsgEvenement"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgSsn2msShipNot -->
<one-to-one
name="msgSsn2msShipNot"
class="i2.application.trafic2000.cp.MsgSsn2msShipNot"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgMs2ssnAlertReq -->
<one-to-one
name="msgMs2ssnAlertReq"
class="i2.application.trafic2000.cp.MsgMs2ssnAlertReq"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgMs2ssnShipReq -->
<one-to-one
name="msgMs2ssnShipReq"
class="i2.application.trafic2000.cp.MsgMs2ssnShipReq"
outer-join="false"
/>
<!-- bi-directional one-to-one association to FluxXml -->
<one-to-one
name="fluxXml"
class="i2.application.trafic2000.cp.FluxXml"
outer-join="auto"
/>
<!-- bi-directional one-to-one association to MsgMouillage -->
<one-to-one
name="msgMouillage"
class="i2.application.trafic2000.cp.MsgMouillage"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgAi -->
<one-to-one
name="msgAi"
class="i2.application.trafic2000.cp.MsgAi"
outer-join="false"
/>
<!-- bi-directional one-to-many association to NotificationMsg -->
<set
name="notificationMsgs"
lazy="true"
inverse="true"
>
<key>
<column name="ID_MESSAGE" />
</key>
<one-to-many
class="i2.application.trafic2000.cp.NotificationMsg"
/>
</set>
<!-- bi-directional one-to-one association to MsgMouv -->
<one-to-one
name="msgMouv"
class="i2.application.trafic2000.cp.MsgMouv"
outer-join="false"
/>
<!-- bi-directional one-to-one association to IdentificationNavire -->
<one-to-one
name="identificationNavire"
class="i2.application.trafic2000.cp.IdentificationNavire"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgShipIdCard -->
<one-to-one
name="msgShipIdCard"
class="i2.application.trafic2000.cp.MsgShipIdCard"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgSsn2msAlertReq -->
<one-to-one
name="msgSsn2msAlertReq"
class="i2.application.trafic2000.cp.MsgSsn2msAlertReq"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgSsn2msShipReq -->
<one-to-one
name="msgSsn2msShipReq"
class="i2.application.trafic2000.cp.MsgSsn2msShipReq"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgSsn2msSecurityRes -->
<one-to-one
name="msgSsn2msSecurityRe"
class="i2.application.trafic2000.cp.MsgSsn2msSecurityRes"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgDepart -->
<one-to-one
name="msgDepart"
class="i2.application.trafic2000.cp.MsgDepart"
outer-join="false"
/>
<!-- bi-directional one-to-many association to IndexMessage -->
<set
name="indexMessages"
lazy="true"
inverse="true"
>
<key>
<column name="ID_MESSAGE" />
</key>
<one-to-many
class="i2.application.trafic2000.cp.IndexMessage"
/>
</set>
<!-- bi-directional one-to-one association to MsgArrivee -->
<one-to-one
name="msgArrivee"
class="i2.application.trafic2000.cp.MsgArrivee"
outer-join="false"
/>
<!-- bi-directional one-to-one association to ComplementInfo -->
<one-to-one
name="complementInfo"
class="i2.application.trafic2000.cp.ComplementInfo"
outer-join="auto"
/>
<!-- bi-directional one-to-many association to JournalSuivi -->
<set
name="journalSuivis"
lazy="true"
inverse="true"
>
<key>
<column name="ID_MESSAGE" />
</key>
<one-to-many
class="i2.application.trafic2000.cp.JournalSuivi"
/>
</set>
<!-- bi-directional one-to-one association to MsgSsn2msPortRes -->
<one-to-one
name="msgSsn2msPortRe"
class="i2.application.trafic2000.cp.MsgSsn2msPortRes"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgSsn2msHazmatReq -->
<one-to-one
name="msgSsn2msHazmatReq"
class="i2.application.trafic2000.cp.MsgSsn2msHazmatReq"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgMs2ssnPortReq -->
<one-to-one
name="msgMs2ssnPortReq"
class="i2.application.trafic2000.cp.MsgMs2ssnPortReq"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgShipIdCardReq -->
<one-to-one
name="msgShipIdCardReq"
class="i2.application.trafic2000.cp.MsgShipIdCardReq"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgNonDepotDechet -->
<one-to-one
name="msgNonDepotDechet"
class="i2.application.trafic2000.cp.MsgNonDepotDechet"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgManifesteMd -->
<one-to-one
name="msgManifesteMd"
class="i2.application.trafic2000.cp.MsgManifesteMd"
outer-join="false"
/>
<!-- bi-directional one-to-one association to MsgSurnav -->
<one-to-one
name="msgSurnav"
class="i2.application.trafic2000.cp.MsgSurnav"
outer-join="false"
/>
<!-- bi-directional many-to-one association to EnumStatutMsg -->
<many-to-one
name="enumStatutMsg"
class="i2.application.trafic2000.cp.EnumStatutMsg"
not-null="true"
>
<column name="STATUT_MSG" />
</many-to-one>
<!-- bi-directional many-to-one association to Participant -->
<many-to-one
name="participant"
class="i2.application.trafic2000.cp.Participant"
not-null="true"
>
<column name="ID_PARTICIPANT" />
</many-to-one>
<!-- bi-directional many-to-one association to Navire -->
<many-to-one
name="navire"
class="i2.application.trafic2000.cp.Navire"
not-null="true"
>
<column name="ID_NAVIRE" />
</many-to-one>
<!-- bi-directional many-to-one association to Cargaison -->
<many-to-one
name="cargaison"
class="i2.application.trafic2000.cp.Cargaison"
not-null="true"
>
<column name="ID_CARGAISON" />
</many-to-one>
<!-- bi-directional many-to-one association to EnumPavillon -->
<many-to-one
name="enumPavillon"
class="i2.application.trafic2000.cp.EnumPavillon"
not-null="true"
>
<column name="PAVILLON" />
</many-to-one>
<!-- bi-directional many-to-one association to Profil -->
<many-to-one
name="profil"
class="i2.application.trafic2000.cp.Profil"
not-null="true"
>
<column name="ID_PROFIL" />
</many-to-one>
<!-- bi-directional many-to-one association to EnumCommerce -->
<many-to-one
name="enumCommerce"
class="i2.application.trafic2000.cp.EnumCommerce"
not-null="true"
>
<column name="COMMERCE" />
</many-to-one>

</class>
</hibernate-mapping>

<?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>
<!--
Created by the Middlegen Hibernate plugin

http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->

<class
name="i2.application.trafic2000.cp.MsgNote"
table="MSG_NOTE"
>

<id
name="idMessage"
type="java.lang.Long"
column="ID_MESSAGE"
>
<generator class="assigned" />
</id>

<property
name="libelle"
type="java.lang.String"
column="LIBELLE"
length="255"
/>

<!-- associations -->
<!-- bi-directional one-to-one association to Message -->
<one-to-one
name="message"
class="i2.application.trafic2000.cp.Message"
outer-join="auto"
constrained="true"
/>

</class>
</hibernate-mapping>

<?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>
<!--
Created by the Middlegen Hibernate plugin

http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->

<class
name="i2.application.trafic2000.cp.MsgOperation"
table="MSG_OPERATION"
>

<id
name="idMessage"
type="java.lang.Long"
column="ID_MESSAGE"
>
<generator class="assigned" />
</id>

<property
name="numero"
type="java.lang.String"
column="NUMERO"
length="20"
/>
<property
name="libelle"
type="java.lang.String"
column="LIBELLE"
length="20"
/>
<property
name="prive"
type="java.lang.String"
column="PRIVE"
not-null="true"
length="1"
/>
<property
name="cmd"
type="java.lang.String"
column="CMD"
length="20"
/>
<property
name="cqops"
type="java.lang.String"
column="CQOPS"
length="20"
/>
<property
name="dateObservation"
type="java.sql.Timestamp"
column="DATE_OBSERVATION"
length="7"
/>
<property
name="descNatureOperation"
type="java.lang.String"
column="DESC_NATURE_OPERATION"
length="40"
/>
<property
name="descDeclenchePar"
type="java.lang.String"
column="DESC_DECLENCHE_PAR"
length="40"
/>
<property
name="nbPersonnesImpliquees"
type="java.lang.Integer"
column="NB_PERSONNES_IMPLIQUEES"
length="5"
/>
<property
name="descAssistanceDemandee"
type="java.lang.String"
column="DESC_ASSISTANCE_DEMANDEE"
length="40"
/>
<property
name="profilCreateur"
type="java.lang.String"
column="PROFIL_CREATEUR"
length="20"
/>
<property
name="azimutDistance"
type="java.lang.String"
column="AZIMUT_DISTANCE"
length="40"
/>
<property
name="reference"
type="java.lang.String"
column="REFERENCE"
length="20"
/>
<property
name="vitesseVent"
type="java.lang.Integer"
column="VITESSE_VENT"
length="5"
/>
<property
name="directionVent"
type="java.lang.String"
column="DIRECTION_VENT"
length="1"
/>
<property
name="vitesseCourant"
type="java.lang.Integer"
column="VITESSE_COURANT"
length="5"
/>
<property
name="directionCourant"
type="java.lang.String"
column="DIRECTION_COURANT"
length="1"
/>
<property
name="visibilite"
type="java.lang.String"
column="VISIBILITE"
length="1"
/>
<property
name="plafond"
type="java.lang.String"
column="PLAFOND"
length="1"
/>
<property
name="temperatureEau"
type="java.lang.Integer"
column="TEMPERATURE_EAU"
length="5"
/>
<property
name="temperatureAir"
type="java.lang.Integer"
column="TEMPERATURE_AIR"
length="5"
/>

<!-- associations -->
<!-- bi-directional one-to-one association to Message -->
<one-to-one
name="message"
class="i2.application.trafic2000.cp.Message"
outer-join="auto"
constrained="true"
/>
<!-- bi-directional many-to-one association to EnumOrigineDeclenchement -->
<many-to-one
name="enumOrigineDeclenchement"
class="i2.application.trafic2000.cp.EnumOrigineDeclenchement"
not-null="true"
>
<column name="ORIGINE_DECLENCHEMENT" />
</many-to-one>
<!-- bi-directional many-to-one association to EnumNebulosite -->
<many-to-one
name="enumNebulosite"
class="i2.application.trafic2000.cp.EnumNebulosite"
not-null="true"
>
<column name="NEBULOSITE" />
</many-to-one>
<!-- bi-directional many-to-one association to EnumAssistanceDemandee -->
<many-to-one
name="enumAssistanceDemandee"
class="i2.application.trafic2000.cp.EnumAssistanceDemandee"
not-null="true"
>
<column name="ASSISTANCE_DEMANDEE" />
</many-to-one>
<!-- bi-directional one-to-one association to MsgFicheCirc -->
<one-to-one
name="msgFicheCirc"
class="i2.application.trafic2000.cp.MsgFicheCirc"
outer-join="auto"
/>
<!-- bi-directional one-to-one association to MsgFicheSar -->
<one-to-one
name="msgFicheSar"
class="i2.application.trafic2000.cp.MsgFicheSar"
outer-join="auto"
/>
<!-- bi-directional one-to-many association to DossierCrise -->
<set
name="dossierCrises"
lazy="true"
inverse="true"
>
<key>
<column name="ID_MESSAGE" />
</key>
<one-to-many
class="i2.application.trafic2000.cp.DossierCrise"
/>
</set>
<!-- bi-directional one-to-one association to MsgFichePolrep -->
<one-to-one
name="msgFichePolrep"
class="i2.application.trafic2000.cp.MsgFichePolrep"
outer-join="auto"
/>
<!-- bi-directional one-to-many association to MsgEvenement -->
<set
name="msgEvenements"
lazy="true"
inverse="true"
>
<key>
<column name="ID_MSG_OPERATION" />
</key>
<one-to-many
class="i2.application.trafic2000.cp.MsgEvenement"
/>
</set>
<!-- bi-directional many-to-one association to EnumEtatMer -->
<many-to-one
name="enumEtatMer"
class="i2.application.trafic2000.cp.EnumEtatMer"
not-null="true"
>
<column name="ETAT_MER" />
</many-to-one>
<!-- bi-directional many-to-one association to EnumNatureOperation -->
<many-to-one
name="enumNatureOperation"
class="i2.application.trafic2000.cp.EnumNatureOperation"
not-null="true"
>
<column name="NATURE_OPERATION" />
</many-to-one>

</class>
</hibernate-mapping>

...

Java code :
NOthing interressant, HQL query "like select m from Message m"

Debug Log :DEBUG - 17/03/2004 14:50:42 450 - opened session
DEBUG - 17/03/2004 14:50:42 450 - begin
DEBUG - 17/03/2004 14:50:42 544 - current autocommit status:true
DEBUG - 17/03/2004 14:50:42 544 - disabling autocommit
DEBUG - 17/03/2004 14:50:44 278 - scroll: select m from Message m where m.idMessage = 1
DEBUG - 17/03/2004 14:50:44 278 - named parameters: {}
DEBUG - 17/03/2004 14:50:44 278 - flushing session
DEBUG - 17/03/2004 14:50:44 278 - Flushing entities and processing referenced collections
DEBUG - 17/03/2004 14:50:44 278 - Processing unreferenced collections
DEBUG - 17/03/2004 14:50:44 278 - Scheduling collection removes/(re)creates/updates
DEBUG - 17/03/2004 14:50:44 278 - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
DEBUG - 17/03/2004 14:50:44 278 - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
DEBUG - 17/03/2004 14:50:44 278 - Dont need to execute flush
DEBUG - 17/03/2004 14:50:44 278 - HQL: select m from i2.application.trafic2000.cp.Message m where m.idMessage = 1
DEBUG - 17/03/2004 14:50:44 278 - SQL: select message0_.ID_MESSAGE as x0_0_ from MESSAGE message0_ where (message0_.ID_MESSAGE=1 )
DEBUG - 17/03/2004 14:50:44 278 - about to open: 2 open PreparedStatements, 2 open ResultSets
DEBUG - 17/03/2004 14:50:44 278 - select message0_.ID_MESSAGE as x0_0_ from MESSAGE message0_ where (message0_.ID_MESSAGE=1 )
Hibernate: select message0_.ID_MESSAGE as x0_0_ from MESSAGE message0_ where (message0_.ID_MESSAGE=1 )
DEBUG - 17/03/2004 14:50:44 278 - preparing statement
DEBUG - 17/03/2004 14:50:47 606 - returning '1' as column: x0_0_
DEBUG - 17/03/2004 14:50:47 606 - returning '1' as column: x0_0_
DEBUG - 17/03/2004 14:50:47 606 - loading [i2.application.trafic2000.cp.Message#1]
DEBUG - 17/03/2004 14:50:47 606 - attempting to resolve [i2.application.trafic2000.cp.Message#1]
DEBUG - 17/03/2004 14:50:47 606 - object not resolved in any cache [i2.application.trafic2000.cp.Message#1]
DEBUG - 17/03/2004 14:50:47 606 - Materializing entity: [i2.application.trafic2000.cp.Message#1]
DEBUG - 17/03/2004 14:50:47 606 - about to open: 3 open PreparedStatements, 3 open ResultSets
DEBUG - 17/03/2004 14:50:47 606 - select message0_.ID_MESSAGE as ID_MESSAGE0_, message0_.NUM_RECEPTION as NUM_RECE2_0_, message0_.NUM_VERSION as NUM_VERS3_0_, message0_.DATE_RECEPTION_EMISSION as DATE_REC4_0_, message0_.DATE_MAJ as DATE_MAJ0_, message0_.LA_REF_ID as LA_REF_ID0_, message0_.MS_REF_ID as MS_REF_ID0_, message0_.TEST_ID as TEST_ID0_, message0_.VERSION_PROTOCOLE as VERSION_9_0_, message0_.TYPE_MSG as TYPE_MSG0_, message0_.FLOTTEUR as FLOTTEUR0_, message0_.STATUT_MSG as STATUT_MSG0_, message0_.ID_PARTICIPANT as ID_PART13_0_, message0_.ID_NAVIRE as ID_NAVIRE0_, message0_.ID_CARGAISON as ID_CARG15_0_, message0_.PAVILLON as PAVILLON0_, message0_.ID_PROFIL as ID_PROFIL0_, message0_.COMMERCE as COMMERCE0_ from MESSAGE message0_ where message0_.ID_MESSAGE=?
Hibernate: select message0_.ID_MESSAGE as ID_MESSAGE0_, message0_.NUM_RECEPTION as NUM_RECE2_0_, message0_.NUM_VERSION as NUM_VERS3_0_, message0_.DATE_RECEPTION_EMISSION as DATE_REC4_0_, message0_.DATE_MAJ as DATE_MAJ0_, message0_.LA_REF_ID as LA_REF_ID0_, message0_.MS_REF_ID as MS_REF_ID0_, message0_.TEST_ID as TEST_ID0_, message0_.VERSION_PROTOCOLE as VERSION_9_0_, message0_.TYPE_MSG as TYPE_MSG0_, message0_.FLOTTEUR as FLOTTEUR0_, message0_.STATUT_MSG as STATUT_MSG0_, message0_.ID_PARTICIPANT as ID_PART13_0_, message0_.ID_NAVIRE as ID_NAVIRE0_, message0_.ID_CARGAISON as ID_CARG15_0_, message0_.PAVILLON as PAVILLON0_, message0_.ID_PROFIL as ID_PROFIL0_, message0_.COMMERCE as COMMERCE0_ from MESSAGE message0_ where message0_.ID_MESSAGE=?
DEBUG - 17/03/2004 14:50:47 622 - preparing statement
DEBUG - 17/03/2004 14:50:47 622 - binding '1' to parameter: 1
DEBUG - 17/03/2004 14:50:47 622 - binding '1' to parameter: 1
DEBUG - 17/03/2004 14:50:47 638 - processing result set
DEBUG - 17/03/2004 14:50:47 638 - result row: 1
DEBUG - 17/03/2004 14:50:47 638 - Initializing object from ResultSet: 1
DEBUG - 17/03/2004 14:50:47 638 - Hydrating entity: i2.application.trafic2000.cp.Message#1
DEBUG - 17/03/2004 14:50:47 638 - returning '5' as column: NUM_RECE2_0_
DEBUG - 17/03/2004 14:50:47 638 - returning '5' as column: NUM_RECE2_0_
DEBUG - 17/03/2004 14:50:47 638 - returning '1' as column: NUM_VERS3_0_
DEBUG - 17/03/2004 14:50:47 638 - returning '1' as column: NUM_VERS3_0_
DEBUG - 17/03/2004 14:50:47 638 - returning '16 mars 2004 10:16:54' as column: DATE_REC4_0_
DEBUG - 17/03/2004 14:50:47 638 - returning '16 mars 2004 10:16:54' as column: DATE_REC4_0_
DEBUG - 17/03/2004 14:50:47 638 - returning '16 mars 2004 10:16:54' as column: DATE_MAJ0_
DEBUG - 17/03/2004 14:50:47 638 - returning '16 mars 2004 10:16:54' as column: DATE_MAJ0_
DEBUG - 17/03/2004 14:50:47 638 - returning '1' as column: LA_REF_ID0_
DEBUG - 17/03/2004 14:50:47 638 - returning '1' as column: LA_REF_ID0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: MS_REF_ID0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: MS_REF_ID0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: TEST_ID0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: TEST_ID0_
DEBUG - 17/03/2004 14:50:47 653 - returning '123' as column: VERSION_9_0_
DEBUG - 17/03/2004 14:50:47 653 - returning '123' as column: VERSION_9_0_
DEBUG - 17/03/2004 14:50:47 653 - returning '16' as column: TYPE_MSG0_
DEBUG - 17/03/2004 14:50:47 653 - returning '16' as column: TYPE_MSG0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: FLOTTEUR0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: FLOTTEUR0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: STATUT_MSG0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: STATUT_MSG0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: ID_PART13_0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: ID_PART13_0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: ID_NAVIRE0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: ID_NAVIRE0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: ID_CARG15_0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: ID_CARG15_0_
DEBUG - 17/03/2004 14:50:47 653 - returning null as column: PAVILLON0_
DEBUG - 17/03/2004 14:50:47 653 - returning null as column: PAVILLON0_
DEBUG - 17/03/2004 14:50:47 653 - returning null as column: ID_PROFIL0_
DEBUG - 17/03/2004 14:50:47 653 - returning null as column: ID_PROFIL0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: COMMERCE0_
DEBUG - 17/03/2004 14:50:47 653 - returning '1' as column: COMMERCE0_
DEBUG - 17/03/2004 14:50:47 653 - done processing result set (1 rows)
DEBUG - 17/03/2004 14:50:47 653 - done closing: 3 open PreparedStatements, 3 open ResultSets
DEBUG - 17/03/2004 14:50:47 653 - closing statement
DEBUG - 17/03/2004 14:50:47 653 - total objects hydrated: 1
DEBUG - 17/03/2004 14:50:47 669 - resolving associations for [i2.application.trafic2000.cp.Message#1]
DEBUG - 17/03/2004 14:50:47 669 - loading [i2.application.trafic2000.cp.EnumTypeMsg#16]
DEBUG - 17/03/2004 14:50:47 669 - attempting to resolve [i2.application.trafic2000.cp.EnumTypeMsg#16]
DEBUG - 17/03/2004 14:50:47 669 - object not resolved in any cache [i2.application.trafic2000.cp.EnumTypeMsg#16]
DEBUG - 17/03/2004 14:50:47 669 - Materializing entity: [i2.application.trafic2000.cp.EnumTypeMsg#16]
DEBUG - 17/03/2004 14:50:47 669 - about to open: 3 open PreparedStatements, 3 open ResultSets
DEBUG - 17/03/2004 14:50:47 669 - select enumtypems0_.TYPE_MSG as TYPE_MSG0_, enumtypems0_.LIBELLE as LIBELLE0_, enumtypems0_.ACTIF as ACTIF0_, enumtypems0_.DUREE_VIE as DUREE_VIE0_, enumtypems0_.DELAI_MODIFICATION as DELAI_MO5_0_, enumtypems0_.EST_TYPE_MOUVEMENT as EST_TYPE6_0_, enumtypems0_.EST_TYPE_POSITION as EST_TYPE7_0_, enumtypems0_.TAILLE_MAX as TAILLE_MAX0_, enumtypems0_.LIBELLE_ANGLAIS as LIBELLE_9_0_, enumtypems0_.CODE_STAT as CODE_STAT0_, enumtypems0_.LIBELLE_LONG as LIBELLE11_0_, enumtypems0_.EST_IHM as EST_IHM0_ from ENUM_TYPE_MSG enumtypems0_ where enumtypems0_.TYPE_MSG=?
Hibernate: select enumtypems0_.TYPE_MSG as TYPE_MSG0_, enumtypems0_.LIBELLE as LIBELLE0_, enumtypems0_.ACTIF as ACTIF0_, enumtypems0_.DUREE_VIE as DUREE_VIE0_, enumtypems0_.DELAI_MODIFICATION as DELAI_MO5_0_, enumtypems0_.EST_TYPE_MOUVEMENT as EST_TYPE6_0_, enumtypems0_.EST_TYPE_POSITION as EST_TYPE7_0_, enumtypems0_.TAILLE_MAX as TAILLE_MAX0_, enumtypems0_.LIBELLE_ANGLAIS as LIBELLE_9_0_, enumtypems0_.CODE_STAT as CODE_STAT0_, enumtypems0_.LIBELLE_LONG as LIBELLE11_0_, enumtypems0_.EST_IHM as EST_IHM0_ from ENUM_TYPE_MSG enumtypems0_ where enumtypems0_.TYPE_MSG=?
DEBUG - 17/03/2004 14:50:47 669 - preparing statement
DEBUG - 17/03/2004 14:50:47 669 - binding '16' to parameter: 1
DEBUG - 17/03/2004 14:50:47 669 - binding '16' to parameter: 1
DEBUG - 17/03/2004 14:50:47 700 - processing result set
DEBUG - 17/03/2004 14:50:47 700 - result row: 16
DEBUG - 17/03/2004 14:50:47 700 - Initializing object from ResultSet: 16
DEBUG - 17/03/2004 14:50:47 700 - Hydrating entity: i2.application.trafic2000.cp.EnumTypeMsg#16
DEBUG - 17/03/2004 14:50:47 700 - returning 'Fiche evenement navigation' as column: LIBELLE0_
DEBUG - 17/03/2004 14:50:47 700 - returning 'Fiche evenement navigation' as column: LIBELLE0_
DEBUG - 17/03/2004 14:50:47 716 - returning '1' as column: ACTIF0_
DEBUG - 17/03/2004 14:50:47 716 - returning '1' as column: ACTIF0_
DEBUG - 17/03/2004 14:50:47 716 - returning '1' as column: DUREE_VIE0_
DEBUG - 17/03/2004 14:50:47 716 - returning '1' as column: DUREE_VIE0_
DEBUG - 17/03/2004 14:50:47 731 - returning '1' as column: DELAI_MO5_0_
DEBUG - 17/03/2004 14:50:47 731 - returning '1' as column: DELAI_MO5_0_
DEBUG - 17/03/2004 14:50:47 731 - returning '1' as column: EST_TYPE6_0_
DEBUG - 17/03/2004 14:50:47 731 - returning '1' as column: EST_TYPE6_0_
DEBUG - 17/03/2004 14:50:47 731 - returning '1' as column: EST_TYPE7_0_
DEBUG - 17/03/2004 14:50:47 731 - returning '1' as column: EST_TYPE7_0_
DEBUG - 17/03/2004 14:50:47 731 - returning '1' as column: TAILLE_MAX0_
DEBUG - 17/03/2004 14:50:47 731 - returning '1' as column: TAILLE_MAX0_
DEBUG - 17/03/2004 14:50:47 747 - returning null as column: LIBELLE_9_0_
DEBUG - 17/03/2004 14:50:47 747 - returning null as column: LIBELLE_9_0_
DEBUG - 17/03/2004 14:50:47 747 - returning null as column: CODE_STAT0_
DEBUG - 17/03/2004 14:50:47 747 - returning null as column: CODE_STAT0_
DEBUG - 17/03/2004 14:50:47 747 - returning null as column: LIBELLE11_0_
DEBUG - 17/03/2004 14:50:47 747 - returning null as column: LIBELLE11_0_
DEBUG - 17/03/2004 14:50:47 747 - returning '0' as column: EST_IHM0_
DEBUG - 17/03/2004 14:50:47 747 - returning '0' as column: EST_IHM0_
DEBUG - 17/03/2004 14:50:47 747 - done processing result set (1 rows)
DEBUG - 17/03/2004 14:50:47 747 - done closing: 3 open PreparedStatements, 3 open ResultSets
DEBUG - 17/03/2004 14:50:47 747 - closing statement
DEBUG - 17/03/2004 14:50:47 747 - total objects hydrated: 1
DEBUG - 17/03/2004 14:50:47 747 - resolving associations for [i2.application.trafic2000.cp.EnumTypeMsg#16]
DEBUG - 17/03/2004 14:50:47 747 - creating collection wrapper:[i2.application.trafic2000.cp.EnumTypeMsg.requetes#16]
DEBUG - 17/03/2004 14:50:47 747 - creating collection wrapper:[i2.application.trafic2000.cp.EnumTypeMsg.participantProfils#16]
DEBUG - 17/03/2004 14:50:47 747 - creating collection wrapper:[i2.application.trafic2000.cp.EnumTypeMsg.paramParticipantMsgs#16]
DEBUG - 17/03/2004 14:50:47 747 - creating collection wrapper:[i2.application.trafic2000.cp.EnumTypeMsg.notificationMsgs#16]
DEBUG - 17/03/2004 14:50:47 747 - creating collection wrapper:[i2.application.trafic2000.cp.EnumTypeMsg.messages#16]
DEBUG - 17/03/2004 14:50:47 747 - creating collection wrapper:[i2.application.trafic2000.cp.EnumTypeMsg.journalSuivis#16]
DEBUG - 17/03/2004 14:50:47 747 - creating collection wrapper:[i2.application.trafic2000.cp.EnumTypeMsg.profilMsgs#16]
DEBUG - 17/03/2004 14:50:47 747 - done materializing entity [i2.application.trafic2000.cp.EnumTypeMsg#16]
DEBUG - 17/03/2004 14:50:47 747 - loading [i2.application.trafic2000.cp.EnumFlotteur#1]
DEBUG - 17/03/2004 14:50:47 747 - attempting to resolve [i2.application.trafic2000.cp.EnumFlotteur#1]
DEBUG - 17/03/2004 14:50:47 747 - object not resolved in any cache [i2.application.trafic2000.cp.EnumFlotteur#1]
DEBUG - 17/03/2004 14:50:47 747 - Materializing entity: [i2.application.trafic2000.cp.EnumFlotteur#1]
DEBUG - 17/03/2004 14:50:47 747 - about to open: 3 open PreparedStatements, 3 open ResultSets
DEBUG - 17/03/2004 14:50:47 747 - select enumflotte0_.FLOTTEUR as FLOTTEUR0_, enumflotte0_.LIBELLE as LIBELLE0_, enumflotte0_.ACTIF as ACTIF0_, enumflotte0_.EST_TYPE_COMMERCE as EST_TYPE4_0_, enumflotte0_.LIBELLE_ANGLAIS as LIBELLE_5_0_, enumflotte0_.CODE_STAT as CODE_STAT0_ from ENUM_FLOTTEUR enumflotte0_ where enumflotte0_.FLOTTEUR=?
Hibernate: select enumflotte0_.FLOTTEUR as FLOTTEUR0_, enumflotte0_.LIBELLE as LIBELLE0_, enumflotte0_.ACTIF as ACTIF0_, enumflotte0_.EST_TYPE_COMMERCE as EST_TYPE4_0_, enumflotte0_.LIBELLE_ANGLAIS as LIBELLE_5_0_, enumflotte0_.CODE_STAT as CODE_STAT0_ from ENUM_FLOTTEUR enumflotte0_ where enumflotte0_.FLOTTEUR=?
DEBUG - 17/03/2004 14:50:47 763 - preparing statement
DEBUG - 17/03/2004 14:50:47 763 - binding '1' to parameter: 1
DEBUG - 17/03/2004 14:50:47 763 - binding '1' to parameter: 1
DEBUG - 17/03/2004 14:50:47 763 - processing result set
DEBUG - 17/03/2004 14:50:47 763 - result row: 1
DEBUG - 17/03/2004 14:50:47 763 - Initializing object from ResultSet: 1
DEBUG - 17/03/2004 14:50:47 763 - Hydrating entity: i2.application.trafic2000.cp.EnumFlotteur#1
DEBUG - 17/03/2004 14:50:47 763 - returning 'R


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 17, 2004 10:09 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
are using list() or iterate() method?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 17, 2004 10:09 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
are you using list() or iterate() method?[/b]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 17, 2004 10:28 am 
Newbie

Joined: Wed Mar 17, 2004 9:32 am
Posts: 6
Location: Nantes (France)
I use Iterate()


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 17, 2004 10:31 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
try with list();

iterate execute an sql query to get all the id and then for each id ask for the details....


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 17, 2004 10:44 am 
Newbie

Joined: Wed Mar 17, 2004 9:32 am
Posts: 6
Location: Nantes (France)
With list(), still the problem

Log Debug :
DEBUG - 17/03/2004 15:43:37 894 - opened session
DEBUG - 17/03/2004 15:43:37 909 - begin
DEBUG - 17/03/2004 15:43:37 909 - current autocommit status:true
DEBUG - 17/03/2004 15:43:37 909 - disabling autocommit
DEBUG - 17/03/2004 15:43:38 019 - find: select m from Message m
Where m.idMessage = 1
DEBUG - 17/03/2004 15:43:38 034 - named parameters: {}
DEBUG - 17/03/2004 15:43:38 097 - compiling query
DEBUG - 17/03/2004 15:43:38 238 - flushing session
DEBUG - 17/03/2004 15:43:38 238 - Flushing entities and processing referenced collections
DEBUG - 17/03/2004 15:43:38 238 - Processing unreferenced collections
DEBUG - 17/03/2004 15:43:38 238 - Scheduling collection removes/(re)creates/updates
DEBUG - 17/03/2004 15:43:38 238 - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
DEBUG - 17/03/2004 15:43:38 238 - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
DEBUG - 17/03/2004 15:43:38 238 - Dont need to execute flush
DEBUG - 17/03/2004 15:43:38 238 - HQL: select m from i2.application.trafic2000.cp.Message m
Where m.idMessage = 1
DEBUG - 17/03/2004 15:43:38 238 - SQL: select message0_.ID_MESSAGE as ID_MESSAGE, message0_.NUM_RECEPTION as NUM_RECE2_, message0_.NUM_VERSION as NUM_VERS3_, message0_.DATE_RECEPTION_EMISSION as DATE_REC4_, message0_.DATE_MAJ as DATE_MAJ, message0_.LA_REF_ID as LA_REF_ID, message0_.MS_REF_ID as MS_REF_ID, message0_.TEST_ID as TEST_ID, message0_.VERSION_PROTOCOLE as VERSION_9_, message0_.TYPE_MSG as TYPE_MSG, message0_.FLOTTEUR as FLOTTEUR, message0_.STATUT_MSG as STATUT_MSG, message0_.ID_PARTICIPANT as ID_PART13_, message0_.ID_NAVIRE as ID_NAVIRE, message0_.ID_CARGAISON as ID_CARG15_, message0_.PAVILLON as PAVILLON, message0_.ID_PROFIL as ID_PROFIL, message0_.COMMERCE as COMMERCE from MESSAGE message0_ where (message0_.ID_MESSAGE=1 )
DEBUG - 17/03/2004 15:43:38 238 - about to open: 0 open PreparedStatements, 0 open ResultSets
DEBUG - 17/03/2004 15:43:38 238 - select message0_.ID_MESSAGE as ID_MESSAGE, message0_.NUM_RECEPTION as NUM_RECE2_, message0_.NUM_VERSION as NUM_VERS3_, message0_.DATE_RECEPTION_EMISSION as DATE_REC4_, message0_.DATE_MAJ as DATE_MAJ, message0_.LA_REF_ID as LA_REF_ID, message0_.MS_REF_ID as MS_REF_ID, message0_.TEST_ID as TEST_ID, message0_.VERSION_PROTOCOLE as VERSION_9_, message0_.TYPE_MSG as TYPE_MSG, message0_.FLOTTEUR as FLOTTEUR, message0_.STATUT_MSG as STATUT_MSG, message0_.ID_PARTICIPANT as ID_PART13_, message0_.ID_NAVIRE as ID_NAVIRE, message0_.ID_CARGAISON as ID_CARG15_, message0_.PAVILLON as PAVILLON, message0_.ID_PROFIL as ID_PROFIL, message0_.COMMERCE as COMMERCE from MESSAGE message0_ where (message0_.ID_MESSAGE=1 )
Hibernate: select message0_.ID_MESSAGE as ID_MESSAGE, message0_.NUM_RECEPTION as NUM_RECE2_, message0_.NUM_VERSION as NUM_VERS3_, message0_.DATE_RECEPTION_EMISSION as DATE_REC4_, message0_.DATE_MAJ as DATE_MAJ, message0_.LA_REF_ID as LA_REF_ID, message0_.MS_REF_ID as MS_REF_ID, message0_.TEST_ID as TEST_ID, message0_.VERSION_PROTOCOLE as VERSION_9_, message0_.TYPE_MSG as TYPE_MSG, message0_.FLOTTEUR as FLOTTEUR, message0_.STATUT_MSG as STATUT_MSG, message0_.ID_PARTICIPANT as ID_PART13_, message0_.ID_NAVIRE as ID_NAVIRE, message0_.ID_CARGAISON as ID_CARG15_, message0_.PAVILLON as PAVILLON, message0_.ID_PROFIL as ID_PROFIL, message0_.COMMERCE as COMMERCE from MESSAGE message0_ where (message0_.ID_MESSAGE=1 )
DEBUG - 17/03/2004 15:43:38 253 - preparing statement
DEBUG - 17/03/2004 15:43:38 347 - processing result set
DEBUG - 17/03/2004 15:43:38 394 - returning '1' as column: ID_MESSAGE
DEBUG - 17/03/2004 15:43:38 394 - returning '1' as column: ID_MESSAGE
DEBUG - 17/03/2004 15:43:38 394 - result row: 1
DEBUG - 17/03/2004 15:43:38 394 - Initializing object from ResultSet: 1
DEBUG - 17/03/2004 15:43:38 409 - Hydrating entity: i2.application.trafic2000.cp.Message#1
DEBUG - 17/03/2004 15:43:38 409 - returning '5' as column: NUM_RECE2_
DEBUG - 17/03/2004 15:43:38 409 - returning '5' as column: NUM_RECE2_
DEBUG - 17/03/2004 15:43:38 409 - returning '1' as column: NUM_VERS3_
DEBUG - 17/03/2004 15:43:38 409 - returning '1' as column: NUM_VERS3_
DEBUG - 17/03/2004 15:43:38 425 - returning '16 mars 2004 10:16:54' as column: DATE_REC4_
DEBUG - 17/03/2004 15:43:38 425 - returning '16 mars 2004 10:16:54' as column: DATE_REC4_
DEBUG - 17/03/2004 15:43:38 425 - returning '16 mars 2004 10:16:54' as column: DATE_MAJ
DEBUG - 17/03/2004 15:43:38 425 - returning '16 mars 2004 10:16:54' as column: DATE_MAJ
DEBUG - 17/03/2004 15:43:38 425 - returning '1' as column: LA_REF_ID
DEBUG - 17/03/2004 15:43:38 425 - returning '1' as column: LA_REF_ID
DEBUG - 17/03/2004 15:43:38 425 - returning '1' as column: MS_REF_ID
DEBUG - 17/03/2004 15:43:38 425 - returning '1' as column: MS_REF_ID
DEBUG - 17/03/2004 15:43:38 425 - returning '1' as column: TEST_ID
DEBUG - 17/03/2004 15:43:38 425 - returning '1' as column: TEST_ID
DEBUG - 17/03/2004 15:43:38 441 - returning '123' as column: VERSION_9_
DEBUG - 17/03/2004 15:43:38 441 - returning '123' as column: VERSION_9_
DEBUG - 17/03/2004 15:43:38 441 - returning '4' as column: TYPE_MSG
DEBUG - 17/03/2004 15:43:38 441 - returning '4' as column: TYPE_MSG
DEBUG - 17/03/2004 15:43:38 441 - returning '1' as column: FLOTTEUR
DEBUG - 17/03/2004 15:43:38 441 - returning '1' as column: FLOTTEUR
DEBUG - 17/03/2004 15:43:38 456 - returning '1' as column: STATUT_MSG
DEBUG - 17/03/2004 15:43:38 456 - returning '1' as column: STATUT_MSG
DEBUG - 17/03/2004 15:43:38 456 - returning '1' as column: ID_PART13_
DEBUG - 17/03/2004 15:43:38 456 - returning '1' as column: ID_PART13_
DEBUG - 17/03/2004 15:43:38 456 - returning '1' as column: ID_NAVIRE
DEBUG - 17/03/2004 15:43:38 456 - returning '1' as column: ID_NAVIRE
DEBUG - 17/03/2004 15:43:38 456 - returning '1' as column: ID_CARG15_
DEBUG - 17/03/2004 15:43:38 456 - returning '1' as column: ID_CARG15_
DEBUG - 17/03/2004 15:43:38 456 - returning null as column: PAVILLON
DEBUG - 17/03/2004 15:43:38 456 - returning null as column: PAVILLON
DEBUG - 17/03/2004 15:43:38 456 - returning null as column: ID_PROFIL
DEBUG - 17/03/2004 15:43:38 456 - returning null as column: ID_PROFIL
DEBUG - 17/03/2004 15:43:38 456 - returning '1' as column: COMMERCE
DEBUG - 17/03/2004 15:43:38 456 - returning '1' as column: COMMERCE
DEBUG - 17/03/2004 15:43:38 472 - done processing result set (1 rows)
DEBUG - 17/03/2004 15:43:38 472 - done closing: 0 open PreparedStatements, 0 open ResultSets
DEBUG - 17/03/2004 15:43:38 472 - closing statement
DEBUG - 17/03/2004 15:43:38 472 - total objects hydrated: 1
DEBUG - 17/03/2004 15:43:38 472 - resolving associations for [i2.application.trafic2000.cp.Message#1]
DEBUG - 17/03/2004 15:43:38 472 - loading [i2.application.trafic2000.cp.EnumTypeMsg#4]
DEBUG - 17/03/2004 15:43:38 472 - attempting to resolve [i2.application.trafic2000.cp.EnumTypeMsg#4]
DEBUG - 17/03/2004 15:43:38 472 - object not resolved in any cache [i2.application.trafic2000.cp.EnumTypeMsg#4]
DEBUG - 17/03/2004 15:43:38 472 - Materializing entity: [i2.application.trafic2000.cp.EnumTypeMsg#4]
DEBUG - 17/03/2004 15:43:38 488 - about to open: 0 open PreparedStatements, 0 open ResultSets
DEBUG - 17/03/2004 15:43:38 488 - select enumtypems0_.TYPE_MSG as TYPE_MSG0_, enumtypems0_.LIBELLE as LIBELLE0_, enumtypems0_.ACTIF as ACTIF0_, enumtypems0_.DUREE_VIE as DUREE_VIE0_, enumtypems0_.DELAI_MODIFICATION as DELAI_MO5_0_, enumtypems0_.EST_TYPE_MOUVEMENT as EST_TYPE6_0_, enumtypems0_.EST_TYPE_POSITION as EST_TYPE7_0_, enumtypems0_.TAILLE_MAX as TAILLE_MAX0_, enumtypems0_.LIBELLE_ANGLAIS as LIBELLE_9_0_, enumtypems0_.CODE_STAT as CODE_STAT0_, enumtypems0_.LIBELLE_LONG as LIBELLE11_0_, enumtypems0_.EST_IHM as EST_IHM0_ from ENUM_TYPE_MSG enumtypems0_ where enumtypems0_.TYPE_MSG=?
Hibernate: select enumtypems0_.TYPE_MSG as TYPE_MSG0_, enumtypems0_.LIBELLE as LIBELLE0_, enumtypems0_.ACTIF as ACTIF0_, enumtypems0_.DUREE_VIE as DUREE_VIE0_, enumtypems0_.DELAI_MODIFICATION as DELAI_MO5_0_, enumtypems0_.EST_TYPE_MOUVEMENT as EST_TYPE6_0_, enumtypems0_.EST_TYPE_POSITION as EST_TYPE7_0_, enumtypems0_.TAILLE_MAX as TAILLE_MAX0_, enumtypems0_.LIBELLE_ANGLAIS as LIBELLE_9_0_, enumtypems0_.CODE_STAT as CODE_STAT0_, enumtypems0_.LIBELLE_LONG as LIBELLE11_0_, enumtypems0_.EST_IHM as EST_IHM0_ from ENUM_TYPE_MSG enumtypems0_ where enumtypems0_.TYPE_MSG=?
DEBUG - 17/03/2004 15:43:38 488 - preparing statement
DEBUG - 17/03/2004 15:43:38 488 - binding '4' to parameter: 1
DEBUG - 17/03/2004 15:43:38 488 - binding '4' to parameter: 1
DEBUG - 17/03/2004 15:43:38 503 - processing result set
DEBUG - 17/03/2004 15:43:38 503 - result row: 4
DEBUG - 17/03/2004 15:43:38 503 - Initializing object from ResultSet: 4
DEBUG - 17/03/2004 15:43:38 503 - Hydrating entity: i2.application.trafic2000.cp.EnumTypeMsg#4
DEBUG - 17/03/2004 15:43:38 503 - returning 'DEPART' as column: LIBELLE0_
DEBUG - 17/03/2004 15:43:38 503 - returning 'DEPART' as column: LIBELLE0_
DEBUG - 17/03/2004 15:43:38 503 - returning '1' as column: ACTIF0_
DEBUG - 17/03/2004 15:43:38 503 - returning '1' as column: ACTIF0_
DEBUG - 17/03/2004 15:43:38 503 - returning '1' as column: DUREE_VIE0_
DEBUG - 17/03/2004 15:43:38 503 - returning '1' as column: DUREE_VIE0_
DEBUG - 17/03/2004 15:43:38 503 - returning '1' as column: DELAI_MO5_0_
DEBUG - 17/03/2004 15:43:38 503 - returning '1' as column: DELAI_MO5_0_
DEBUG - 17/03/2004 15:43:38 503 - returning '1' as column: EST_TYPE6_0_
DEBUG - 17/03/2004 15:43:38 503 - returning '1' as column: EST_TYPE6_0_
DEBUG - 17/03/2004 15:43:38 503 - returning '1' as column: EST_TYPE7_0_
DEBUG - 17/03/2004 15:43:38 503 - returning '1' as column: EST_TYPE7_0_
DEBUG - 17/03/2004 15:43:38 503 - returning '1' as column: TAILLE_MAX0_
DEBUG - 17/03/2004 15:43:38 503 - returning '1' as column: TAILLE_MAX0_
DEBUG - 17/03/2004 15:43:38 503 - returning null as column: LIBELLE_9_0_
DEBUG - 17/03/2004 15:43:38 503 - returning null as column: LIBELLE_9_0_
DEBUG - 17/03/2004 15:43:38 503 - returning null as column: CODE_STAT0_
DEBUG - 17/03/2004 15:43:38 503 - returning null as column: CODE_STAT0_
DEBUG - 17/03/2004 15:43:38 503 - returning 'DEP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;D


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 18, 2004 5:20 am 
Newbie

Joined: Wed Mar 17, 2004 9:32 am
Posts: 6
Location: Nantes (France)
Is this problem know by Hibernate team ?

It looks like http://forum.hibernate.org/viewtopic.php?t=929078

Should I had this trouble to Bug list ?

LeKOala


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 18, 2004 5:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Please do not waste our time with a bug report!

This looks all perfectly correct to me. Looks like you do not understand

(1) the difference between scroll() and list()
(2) the natural impact of constrained="false" on a one-to-one association
(3) the use of LEFT JOIN FETCH in HQL
(4) the very clear instructions to not blame Hibernate just because you can't get something to work immediately

So, I would say, that some time spent reading the documentation and experimenting with a much simpler test case is in order.

Do not be surprised if people can't answer your questions when you post an enormous mapping file full of irrelevant details, with broken formatting due to missing [ code ] tags.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 18, 2004 5:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Perhapas even:

(2.5) the effect of <class lazy="true">


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 18, 2004 6:18 am 
Newbie

Joined: Wed Mar 17, 2004 9:32 am
Posts: 6
Location: Nantes (France)
Hi, Hibernate Team !

I'm not blaming Hibernate...
I don't want to get immediate answer...
I don't want you to lost your time...


After a lot of testing and reading doc,
after testing use_outer_join parameter,
after testing max_fetch_depth paramter,
as it is impossible to use "lazy" for one-to-one association,
seeing the poor documentation of Hibernate,
I can say :
For one-to-one association,
When you use Foreign Key as Primary Key,
With many associations,
When you want to load an object,
Hibernate makes
either an enormous query with many outer join
either many queries (depends on use_outer_join parameter)
And it is impossible to control it with any paramter...

I got nothing else to say.

THANKS TO GAVIN FRO HIS UNPOLITE ANSWER.

LeKOala.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 18, 2004 6:25 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
First Warning.

If you make another post like that, you will be banned. Don't try to argue, this policy was instituted to ensure that the forum does not degenerate into bickering. I have no concern for fairness or who is right/wrong. If bickering starts, one person must be banned, and it certainly won't be me.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 18, 2004 6:33 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
Quote:
seeing the poor documentation of Hibernate


What's happening man?
Don't get nervious, you can understand that 99,9 bug alerts in this forum are false.
Many people prefer posting a post instead of reading or searching on the site or the forum ....

So you may have read the doc, you may have problem doing what you want, maybe there is a bug (i doubt...) but don't blame hibernate team when they advise you to read the doc, just be patient...

Their work is GREAT, the doc is excellent, yes it is excellent, comparing to all the other open source project. Just wait a little more to have Hibernate in action.

I remember a bug i had, Gavin was sure i was doing something wrong, i was sure i wasn't, after many posts and hours following my case, it was a STUPID error i was coding.....
so please respect the men, the work, the doc and if you find a fix to your problem please post it here, it may help others...


Aller t'inquiete,


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 18, 2004 6:50 am 
Newbie

Joined: Wed Mar 17, 2004 9:32 am
Posts: 6
Location: Nantes (France)
I just had a look to http://www.hibernate.org/162.html
in the Wiki.

It explains why lazy loading goes away with one-to-one association.

Any other way to solve this problem ?


PS/ sorry Gavin, for my precedent answer...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 18, 2004 7:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Well, not really. For a <one-to-one constrained="false"/>, we have a choice between sequential reads, or outer joins; lazy is simply not possible. So, either:

(a) use <many-to-one> instead
(b) use LEFT JOIN FETCH

There are no other possible solutions.


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

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.