J'ai déjà verifié ça je ne pense pas que c le cas : voila tout
<class
name="com.report.persistence.pojos.Rejet"
table="REJET"
>
<composite-id>
<key-many-to-one
name="rejapouv"
class="com.report.persistence.pojos.Rejapouv"
column="S_MOTIF"
/>
<key-many-to-one
name="tournee"
class="com.report.persistence.pojos.Tournee"
column="S_IDTOUR"
/>
</composite-id>
<property
name="nQtcour"
type="java.lang.Integer"
column="N_QTCOUR"
length="5"
/>
<property
name="nQtpages"
type="java.lang.Integer"
column="N_QTPAGES"
length="5"
/>
<!-- Associations -->
<!-- derived association(s) for compound key -->
<!-- end of derived association(s) -->
</class>
Rejapouv.hbm.xml :
<class
name="com.report.persistence.pojos.Rejapouv"
table="REJAPOUV"
>
<id
name="code"
type="java.lang.Integer"
column="CODE"
>
<generator class="assigned" />
</id>
<property
name="description"
type="java.lang.String"
column="DESCRIPTION"
not-null="true"
unique="true"
length="50"
/>
<property
name="type"
type="java.lang.String"
column="TYPE"
length="20"
/>
<property
name="ordre"
type="java.lang.Integer"
column="ORDRE"
length="3"
/>
<!-- Associations -->
<set
name="rejets"
lazy="true"
inverse="true"
cascade="all"
>
<key>
<column name="DESCRIPTION" />
</key>
<one-to-many
class="com.report.persistence.pojos.Rejet"
/>
</set>
</class>
Tournee.hbm.xml :
<class
name="com.report.persistence.pojos.Tournee"
table="TOURNEE"
>
<id
name="sIdtour"
type="java.lang.String"
column="S_IDTOUR"
>
<generator class="assigned" />
</id>
<property
name="dtArrivtour"
type="java.util.Date"
column="DT_ARRIVTOUR"
length="7"
/>
<property
name="sIdutilisateur"
type="java.lang.String"
column="S_IDUTILISATEUR"
length="50"
/>
<property
name="sType"
type="java.lang.String"
column="S_TYPE"
length="50"
/>
<property
name="sTransporteur"
type="java.lang.String"
column="S_TRANSPORTEUR"
length="50"
/>
<property
name="sOrigine"
type="java.lang.String"
column="S_ORIGINE"
length="50"
/>
<property
name="nBacs"
type="java.lang.Integer"
column="N_BACS"
length="5"
/>
<property
name="nPlisattar"
type="java.lang.Integer"
column="N_PLISATTAR"
length="5"
/>
<property
name="nPlisrecusar"
type="java.lang.Integer"
column="N_PLISRECUSAR"
length="5"
/>
<property
name="sRefposte"
type="java.lang.String"
column="S_REFPOSTE"
length="50"
/>
<property
name="dtBordbt"
type="java.util.Date"
column="DT_BORDBT"
length="7"
/>
<property
name="nBordbt"
type="java.lang.Integer"
column="N_BORDBT"
length="5"
/>
<property
name="nPlisattbt"
type="java.lang.Integer"
column="N_PLISATTBT"
length="5"
/>
<property
name="nPlisrecusbt"
type="java.lang.Integer"
column="N_PLISRECUSBT"
length="5"
/>
<property
name="nPlisattouvbt"
type="java.lang.Integer"
column="N_PLISATTOUVBT"
length="5"
/>
<property
name="nPlisrecusouvbt"
type="java.lang.Integer"
column="N_PLISRECUSOUVBT"
length="5"
/>
<property
name="nPlisouvauto"
type="java.lang.Integer"
column="N_PLISOUVAUTO"
length="5"
/>
<property
name="nPlisouvman"
type="java.lang.Integer"
column="N_PLISOUVMAN"
length="5"
/>
<property
name="nPlisavecannexe"
type="java.lang.Integer"
column="N_PLISAVECANNEXE"
length="5"
/>
<property
name="nPlissansannexe"
type="java.lang.Integer"
column="N_PLISSANSANNEXE"
length="5"
/>
<property
name="sComment1"
type="java.lang.String"
column="S_COMMENT1"
length="50"
/>
<property
name="sComment2"
type="java.lang.String"
column="S_COMMENT2"
length="50"
/>
<property
name="nNonnum"
type="java.lang.Integer"
column="N_NONNUM"
length="5"
/>
<property
name="dtDebut"
type="java.util.Date"
column="DT_DEBUT"
length="7"
/>
<property
name="dtFin"
type="java.util.Date"
column="DT_FIN"
length="7"
/>
<!-- Associations -->
<!-- bi-directional one-to-many association to Rejet -->
<set
name="rejets"
lazy="true"
inverse="true"
cascade="all"
>
<key>
<column name="S_IDTOUR" />
</key>
<one-to-many
class="com.report.persistence.pojos.Rejet"
/>
</set>
</class>
les scripts de création de table sont les suivants :
create table REJET(
S_IDTOUR VARCHAR2(10) not null,
S_MOTIF VARCHAR2(50) not null,
N_QTCOUR NUMBER(5),
N_QTPAGES NUMBER(5));
create table REJAPOUV(
CODE NUMBER(3) PRIMARY KEY not null,
DESCRIPTION VARCHAR2(50) not null,
TYPE VARCHAR2(20),
ORDRE NUMBER(3));
create table TOURNEE(
S_IDTOUR VARCHAR2(10) PRIMARY KEY not null,
DT_ARRIVTOUR DATE,
S_IDUTILISATEUR VARCHAR2(50),
S_TYPE VARCHAR2(50),
S_TRANSPORTEUR VARCHAR2(50),
S_ORIGINE VARCHAR2(50),
N_BACS NUMBER(5),
N_PLISATTAR NUMBER(5),
N_PLISRECUSAR NUMBER(5),
S_REFPOSTE VARCHAR2(50),
DT_BORDBT DATE,
N_BORDBT NUMBER(5),
N_PLISATTBT NUMBER(5),
N_PLISRECUSBT NUMBER(5),
N_PLISATTOUVBT NUMBER(5),
N_PLISRECUSOUVBT NUMBER(5),
N_PLISOUVAUTO NUMBER(5),
N_PLISOUVMAN NUMBER(5),
N_PLISAVECANNEXE NUMBER(5),
N_PLISSANSANNEXE NUMBER(5),
S_COMMENT1 VARCHAR2(50),
S_COMMENT2 VARCHAR2(50),
N_NONNUM NUMBER(5),
DT_DEBUT DATE,
DT_FIN DATE);
|