Bonjour est-il possible d'avoir un entité écrit en Ejb3 dans lequel on trouve un autre entité encore en ejb2 comme clé étrangère.

Exemple:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
@Entity
@Table(name="organisation.orientation_etat")
public class OrientationEtatInfo implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
 
	//Attributes
	private Integer id;
	private OrientationProjetInfo projet;
	private Date dateDebut;
	private Date dateFin;
	private String commentaire;
	private String evaluation;
	private Date echeance;
 
        //Get Methods
 
	/**
         * Gets the id
         * @return Integer
         */
	@Id
	@Column(name="id")
	public Integer getId() {
		return id;
	}
 
	/**
         * Gets the projet
         * @return OrientationProjetInfo
         */
	@ManyToOne
	@JoinColumn(name="id_projet")
	public OrientationProjetInfo getProjet() {
		return projet;
	}
OrientationProjetInfo étant un entité ancien écrit en EJB2.