-->
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.  [ 3 posts ] 
Author Message
 Post subject: Problème simple de mapping mais je suis coincé !
PostPosted: Tue Nov 15, 2005 1:40 pm 
Beginner
Beginner

Joined: Mon Aug 08, 2005 7:54 am
Posts: 27
Bonjour,

Je suis désolé de poster cette question simple sur le forum, mais je tourne en rond et je n'ai plus d'idée.

Voilà ma classe Element :

Code:
public class Element extends MetaData implements IElement
{
    private Long id;
    private String label;
    private String commentary;
    public Element(){}
    public String getCommentary()
    {
       return commentary;
    }
    public void setCommentary(String commentary)
    {
       this.commentary = commentary;
    }
    public String getLabel()
    {
       return label;
    }
    public void setLabel(String label)
    {
       this.label = label;
    }
   public Long getId()
   {
      return id;
   }
   public void setId(Long id)
   {
      this.id = id;
   }   
}


Jusque que là rien de bien sorcier... Voilà le fichier de mapping :

Code:
        <class name="com.ao.o3s.data.Element" table="LINE">
                <id name="id" column="LINE_ID">
                        <generator class="increment"/>
                </id>
                <property name="Label" column="LABEL"/>
                <property name="Commentary" column="COMMENTARY"/>
        </class>


Et quand je teste voilà la requête généré :
Code:
insert into LINE (LABEL,  COMMENTARY, LINE_ID) values (?, ?, ?)


Pourtant mon element est bien mise à jour lors du setUp de mon TestCase :
Code:
       this.element = new Element(new O3SString());
       element.setLabel("SimpleTest");
       element.setValue("Simple Value");
       element.setCommentary("Simple comment also");
       _logger.info("Label: " + element.getLabel());
       _logger.info("Value: " + element.getValue());
       _logger.info("Comment: " + element.getCommentary());


J'ai n'ai aucune erreur généré lors de l'execution... Même pas un PropertyNotFound, ou quelque chose qui m'indique qu'il ne serait accéder aux accesseurs des propriétés....

Je n'ai vraiment plus d'idée; si qql a une idée, elle bienvenue...

_________________
Belaran,
"Slowly climbing the moutain of Hibernate's mystery..."


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 16, 2005 5:28 am 
Beginner
Beginner

Joined: Mon Aug 08, 2005 7:54 am
Posts: 27
Ok, bien que la query afficher ne contiennet que des ?,?,? comme ci dessous :
Code:
insert into LINE (LABEL,  COMMENTARY, LINE_ID) values (?, ?, ?)


Les valeurs étaient bien insérés dans la base... Putain deux jours pour résoudre un problème non existant... : (

_________________
Belaran,
"Slowly climbing the moutain of Hibernate's mystery..."


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 16, 2005 5:36 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
pour information les types (les ?), sont loggés dans la categorie org.hibernate.type (regarde le log4j par defaut de la distribution d'hibernate

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.