You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by frederic visticot <fr...@noos.fr> on 2003/04/09 21:51:01 UTC

criteria and inheritance

Hello,
I have defined 2 classes
Personne and Professeur. Professeur inheritate from personne.
The classe Professeur has an extra param (matricule)

<table name="personne" description="Personne">
    <column
      name="personne_id"
      required="true"
      primaryKey="true"
      type="INTEGER"
      description="Personne Id"/>
    <column
      name="nom"
      required="true"
      type="VARCHAR"
      size="255"
      description="Nom de la personne"/>
      <column
      name="prenom"
      required="true"
      type="VARCHAR"
      size="255"
      description="Prenom de la personne"/>
      <column
   name="matricule" inheritance="single" type="VARCHAR" size="10">
   <inheritance key="Professeur" class="Professeur" extends="org.fred.etablissement.Personne"/>
  </column>      
  </table>

How to build the criteria to have in result a list of all Professeur without having all other personne ???

Thanks in advance 
Fred Visticot