-->
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.  [ 2 posts ] 
Author Message
 Post subject: [Hibernate] mapping erroné, cause de l'erreur le tag <ma
PostPosted: Mon May 22, 2006 4:58 am 
Newbie

Joined: Thu Apr 13, 2006 9:33 am
Posts: 3
Location: orsay
salut
code de creation de la base

Code:
CREATE TABLE ACTIVITY (
KEY_ACTIVITY    VARCHAR(10)     NOT NULL,
LB_ACTIVITY     VARCHAR(30)     NOT NULL,
KEY_PARENT     VARCHAR(10),
NU_LEVEL     INTEGER      NOT NULL,
SEQ_VERSION     INTEGER      NOT NULL DEFAULT 0
);
ALTER TABLE ACTIVITY ADD CONSTRAINT ACTIVITY_CST_1 PRIMARY KEY (KEY_ACTIVITY);
CREATE UNIQUE INDEX ACTIVITY_IDX_1 ON ACTIVITY (KEY_PARENT);
GRANT DELETE, INSERT, SELECT, UPDATE ON ACTIVITY TO SENZA;


declaration des attributs dans ma classe activityDto.

Code:
    String          keyActivity;
    String          lbActivity;
    Map             keyParent;
    long            nuLevel;
    long            seqVersion;


le fichier de mapping

Code:
<class
   name="ActivityDto"  table="activity">
   <map
        name="keyParent" table="activity">
       <key column="key_activity"></key>
       <index column="key_activity" type="string"></index>
       <element column="key_activity" type="string"></element>
   </map>
</class>


l'erreur qui me sort est la suivant

Quote:
map index element must specify a type : keyParent


j'ai jamais utilisé ce tag pour faire du mapping, j'ai fait ce que j'ai fait en regardant la doc de hibernate , mais je crois que j'ai fait une erreur dont je n'arrive pas à m'en apercevoir.

merci d'avance de votre aide.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 25, 2006 9:15 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
<key column="..." type="string"/>

string ou autre

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.