-->
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: FETCH and release 2.0
PostPosted: Wed May 19, 2004 6:04 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
hi all,
is fetch hql option supported by release 2.0
i've got
Code:
net.sf.hibernate.QueryException: in expected: produit.marque [from com.bo.produit.Produit as produit left join fetch produit.marque where produit.fiche.pere.idNomenclature=530]
   at net.sf.hibernate.hql.FromParser.token(FromParser.java:92)
   at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:73)
   at net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:120)
   at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29)
   at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:132)
   at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:119)
   at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:376)
   at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:354)
   at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1355)
   at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1319)
   at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:74)


when trying to activate it

Code:
from com.bo.produit.Produit as produit left join fetch produit.marque



here is the mapping file

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
   <class name="com.bo.produit.Produit" table="PRODUIT">
      <id column="ID_PRODUIT" name="idProduit" >
         <generator class="sequence">
            <param name="sequence">SEQ_PRODUIT</param>
         </generator>         
      </id>
      <property column="RIN"  name="rin" not-null="true" />
      <property column="LIBELLE"  name="libelleProduit" not-null="true" />
      <property column="LIBELLE_RPC"  name="libelleRPC" not-null="false" />
      <property column="PLUS_PRODUIT"  name="plusProduit" not-null="true" />
      <property column="DATE_CREATION"  name="dateCreation" not-null="true" />
      <property column="DATE_MODIFICATION"  name="dateModification" not-null="true" />
      <property column="ID_FAMILLE_RPC"  name="idFamille" not-null="false" />
      <property column="MISE_A_DISPOSITION"  name="miseADisposition" not-null="false" />
      <many-to-one column="ID_NOMENCLATURE" name="fiche" class="com.bo.segmentation.Nomenclature" not-null="false" />
      <many-to-one name="marque" column="ID_MARQUE" />
      <bag name="valeurs" lazy="true" inverse="true" cascade="all" table="VALEUR_CARACTERISTIQUE">
         <key column="ID_PRODUIT"/>
         <one-to-many column="ID_PRODUIT" class="com.bo.segmentation.ValeurCaracteristique"/>
       </bag>
   </class>
</hibernate-mapping>



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.