-->
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: Inh
PostPosted: Wed Oct 06, 2004 10:44 am 
Newbie

Joined: Tue Sep 14, 2004 8:40 am
Posts: 4
Hibernate version:
Hibernate 2.0
Mapping documents:
Table client mapping file :
<hibernate-mapping>
<class
name="myPackage.Client"
table="CLIENT"
>
<id
name="id"
type="long"
column="ID"
unsaved-value="0"
>
<generator class="seqhilo">
<param name="sequence">CLIENT_SEQ</param>
<param name="max_lo">0</param>
</generator>
</id>

<discriminator
column="CODE_DISCRIMINANT"
type="java.lang.String"
/>

<property
name="qualite"
type="java.lang.String"
column="QUALITE"
unique="true"
length="1"
/>
<property
name="dateCreation"
type="java.sql.Timestamp"
column="DATE_CREATION"
length="7"
/>
<property
name="dateModif"
type="java.sql.Timestamp"
column="DATE_MODIF"
length="7"
/>
<set
name="dossierVoyages"
lazy="true"
inverse="true"
>
<key>
<column name="CLIENT" />
</key>
<one-to-many
class="myPackage.DossierVoyage"
/>
</set>

<subclass
name="myPackage.Interlocuteur"
discriminator-value="INTERLOCUTEUR">
<property
name="prenom"
type="java.lang.String"
column="PRENOM"
not-null="true"
unique="true"
length="30"
/>
<property
name="nom"
type="java.lang.String"
column="NOM"
not-null="true"
unique="true"
length="30"
/>
</subclass>
</class>
</hibernate-mapping>

Name and version of the database you are using:
Oracle 8i


- the mapping file represent the table CLIENT.
Containing a sublass : Interlocuteur
and a one-to-many relation to table DossierVoyage

question :
How can i do a multi criteria method with API Criteria on Interlocuteur.class (subclass of CLIENT) with Expression on :
- DossierVoyage.anyProperty
- Interlocuteur.nom

cause the relation is on CLIENT not on Interlocuteur
so i dont have an associationPath to DossierVoyage from Interlocuteur.

anyone got an idea pls ?

thanks,
Franck


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.