-->
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.  [ 1 post ] 
Author Message
 Post subject: Besoin d'aide (JPA)
PostPosted: Fri Aug 19, 2011 8:31 pm 
Newbie

Joined: Fri Aug 19, 2011 8:21 pm
Posts: 3
Salut a tous ,

j'ai les 2 tables suivantes et j'arrive pas a générer avec hibernate (JPA)

http://cl.ly/2k3A0l0J1K3N1U393g1h
Class Reservation

Code:
@Entity
@Table(name="Reservation")
public class Reservation {
   @Id
   @GeneratedValue(strategy=GenerationType.AUTO)
   @Column(name="numReservation")
   private Integer numChambre;
   
   @Column(name="debutReservation")
   @Temporal(TemporalType.DATE)
   private Calendar debutReservation;
   
   
   @Column(name="finReservation")
   @Temporal(TemporalType.DATE)
   private Calendar finReservation;
   
   @Column(name="dateReservation")
   @Temporal(TemporalType.DATE)
   private Calendar datereservation;
   
   
   @Column(name="prix")
   private Double prix;
   
   
   @Column(name="libelleReservation")
   private String libelleReservation;
   
   
   //@OneToMany(mappedBy="Reservation")
   //private List<Client> ClientList;

}



Class Client
Code:
@Entity
@Table(name="Client")
public class Client {
   @Id
   @GeneratedValue(strategy=GenerationType.AUTO)
   @Column(name="numClient")
   private Integer numClient;
   
   @Column(name="nameClient")
   private String nameClient;
   
   @Column(name="adressClient")
   private String adressClient;
   
   @Column(name="phoneClient")
   private String phoneclient;
   
   public Integer getNumClient() {
      return numClient;
   }




j'arrive pas a m'en sortir avec les relations entre les tables .
si quelqu'un pouvais me corriger ça avec des commentaire explicatif ça serais gentil :)
Merci


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

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.