-->
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: could not execute query / no data found
PostPosted: Tue Feb 21, 2006 4:48 am 
Newbie

Joined: Thu Feb 16, 2006 1:27 pm
Posts: 2
I use the following mapping file to map a join table "VXLucieProduitLotProjet_NEW" wich used to retrive the many to many association between "VXLucieProjetLotProjet" and "VXLucieProduit".

If I don't use a subselect into the join tag, I have the errors :
could not execute query
no data found
But if I run myself the generated request on the database, there are results.

When I add a subselect wich return the content of table specified in the join element (like in following mapping file) , the problem disappear.

I don't think that is normal, is it?

<class name="com.apis.cz.donnees.mapping.JADE.ProduitLotProjet" table="VXLucieProduitLotProjet_NEW" lazy="false" >
<composite-id name="id" class="com.apis.cz.donnees.mapping.JADE.ProduitLotProjetId">
<key-property name="produit" type="string">
<column name="Produit2" />
</key-property>
<key-property name="projet" type="string">
<column name="Projet" />
</key-property>
</composite-id>


<property name="statut" type="string">
<column name="Statut" length="10"/>
</property>

.... other properties ...

<join table="VXLucieProduitLotProjet_NEW" inverse="true" optional="true" >
<subselect>
select * from VXLucieProduitLotProjet_NEW
</subselect>
<key>
<column name="Produit2" />
<column name="Projet"/>
<column name="Lot"/>
</key>
<many-to-one
name="produit"
column="Produit2"
update="false" insert="false" fetch="select" lazy="false"
not-null="true"/>
<many-to-one name="projet" ...../>
</join>
</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.