-->
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: Jointure entre deux tables
PostPosted: Tue Jun 07, 2005 11:26 am 
Newbie

Joined: Tue Jun 07, 2005 11:19 am
Posts: 2
Bonjour,

Je suis débutant sur hibernate

J'ai une table MOVIES qui contient les champs:

ID
NAME
FK_STYLE

FK_STYLE est une FK vers la PK de la table STYLE

Table STYLE:

ID
STYLE_NAME

J'ai fait une classe movies, qui comporte les attributs suivants:

public class Movie {

private int id;
private String name;
private String style;

// Getter / Setter methods

}

Comment puis-je faire dans le fichier de mapping pour spécifier que l'attribut style provient de la table STYLE (jointure des tables MOVIES et STYLE)

Merci beaucoup pour votre aide,

Fabrice


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 07, 2005 11:47 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
<join/> avec hibernate 3, sinon many-to-one avec hibernate 2 mais tu obtiendras un objet Style et non une String

tu devrais lire Hibernate in action ou au moins le guide de référence.

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 08, 2005 4:33 am 
Newbie

Joined: Tue Jun 07, 2005 11:19 am
Posts: 2
Merci, je vais lire ce livre ;-)


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.