salut les amis
lorsque je mappe ma vue avec hibernate il me génère de classe, le problème c'est lorsque il y a un champs vide dans la base il y a un problème, l'objet (la ligne) qui a le champs vide devient null
view.java
viewId.java
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 @Entity @Table(name = "S_RECHERCHE_DOSSIER", schema = "SACGLF") public class SRechercheDossier implements java.io.Serializable { private SRechercheDossierId id; @EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "idclient", column = @Column(name = "IDCLIENT", nullable = false, precision = 22, scale = 0)), @AttributeOverride(name = "iddosclt", column = @Column(name = "IDDOSCLT", nullable = false, precision = 22, scale = 0)), @AttributeOverride(name = "iddos", column = @Column(name = "IDDOS", nullable = false, precision = 22, scale = 0)), @AttributeOverride(name = "cinClient", column = @Column(name = "CIN_CLIENT", length = 30)), @AttributeOverride(name = "nomClient", column = @Column(name = "NOM_CLIENT", length = 100)), @AttributeOverride(name = "prenomClient", column = @Column(name = "PRENOM_CLIENT", length = 30)), @AttributeOverride(name = "numDossier", column = @Column(name = "NUM_DOSSIER", precision = 22, scale = 0)) }) public SRechercheDossierId getId() { return this.id; } public void setId(SRechercheDossierId id) { this.id = id; } }
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55 @Embeddable public class SRechercheDossierId implements java.io.Serializable { private int idclient; private int iddosclt; private int iddos; private String nomClient; private String prenomClient; @Column(name = "IDCLIENT", nullable = false, precision = 22, scale = 0) public int getIdclient() { return this.idclient; } public void setIdclient(int idclient) { this.idclient = idclient; } @Column(name = "IDDOSCLT", nullable = false, precision = 22, scale = 0) public int getIddosclt() { return this.iddosclt; } public void setIddosclt(int iddosclt) { this.iddosclt = iddosclt; } @Column(name = "IDDOS", nullable = false, precision = 22, scale = 0) public int getIddos() { return this.iddos; } public void setIddos(int iddos) { this.iddos = iddos; } @Column(name = "NOM_CLIENT", length = 100) public String getNomClient() { return this.nomClient; } public void setNomClient(String nomClient) { this.nomClient = nomClient; } @Column(name = "PRENOM_CLIENT", length = 30) public String getPrenomClient() { return this.prenomClient; } public void setPrenomClient(String prenomClient) { this.prenomClient = prenomClient; } }
Partager