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: Retrouver infos de mapping
PostPosted: Wed Feb 14, 2007 1:33 pm 
Newbie

Joined: Wed Feb 14, 2007 1:24 pm
Posts: 3
Bonjour,

Y a t'il moyen d'interroger le mapping pour connaitre les attributs des champs d'une table ?

J'ai un formulaire permettant de saisir un texte pour mettre dans une BD à l'aide d'hibernate dans un VARCHAR.
J'aimerais lors de la création du chanmp de saisie pouvoir limiter la taille de ce champ en fonction de l'information de mapping de la BD.

Merci de votre aide.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 20, 2007 3:49 am 
Expert
Expert

Joined: Thu Sep 04, 2003 8:23 am
Posts: 368
Tu peux utiliser les metadata

http://www.hibernate.org/hib_docs/v3/re ... e-metadata

Sinon perso j'ai utilisé les annotations d'hibernate annotations et c'est très pratique. Tu mets dans tes objets métier des annotations de type taille, not-null, ... et tu peux les récupérer côté présentation. Tu peux aussi passer un objet au ClassValidator qui te dira si l'instance respecte les règles. Tout est déjà fait et à disposition

_________________
Seb
(Please don't forget to give credits if you found this answer useful :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 02, 2007 4:52 am 
Newbie

Joined: Wed Feb 14, 2007 1:24 pm
Posts: 3
Merci cela me semble intéressant comme piste. Je vais regarder ca dès que j'aurais un peu de dispo pour ce genre de chose.


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.