Salem
bon j'explique;
je génere mon mes classes a partir du base de données avec hibernate en faite tout marche bien mais il ya une petite probléme :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
org.springframework.dao.InvalidDataAccessResourceUsageException: could not load an entity: [model.Structure#5]; nested exception is org.hibernate.exception.SQLGrammarException: could not load an entity: [model.Structure#5]
c'est clair qui est une probléme d'annotation mais elle est géneré par defaut avec hibernate et je n'arrive a le corriger
voici mon classe structure :
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
56
57
58
59
60
61
62
63
64
 * Structure generated by hbm2java
 */
@Entity
@Table(name = "Structure")
public class Structure implements java.io.Serializable {
 
	private String codStrcStrc;
	private String libStrcStrc;
	private Set<Interim> interims = new HashSet<Interim>(0);
	private Set<Utilisateur> utilisateurs = new HashSet<Utilisateur>(0);
 
	public Structure() {
	}
 
	public Structure(String codStrcStrc) {
		this.codStrcStrc = codStrcStrc;
	}
 
	public Structure(String codStrcStrc, String libStrcStrc,
			Set<Interim> interims, Set<Utilisateur> utilisateurs) {
		this.codStrcStrc = codStrcStrc;
		this.libStrcStrc = libStrcStrc;
		this.interims = interims;
		this.utilisateurs = utilisateurs;
	}
 
	@Id
	@Column(name = "COD_STRC_STRC", unique = true, nullable = false, length = 20)
	public String getCodStrcStrc() {
		return this.codStrcStrc;
	}
 
	public void setCodStrcStrc(String codStrcStrc) {
		this.codStrcStrc = codStrcStrc;
	}
 
	@Column(name = "LIB_STRC_STRC", length = 30)
	public String getLibStrcStrc() {
		return this.libStrcStrc;
	}
 
	public void setLibStrcStrc(String libStrcStrc) {
		this.libStrcStrc = libStrcStrc;
	}
 
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "structure")
	public Set<Interim> getInterims() {
		return this.interims;
	}
 
	public void setInterims(Set<Interim> interims) {
		this.interims = interims;
	}
 
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "structure")
	public Set<Utilisateur> getUtilisateurs() {
		return this.utilisateurs;
	}
 
	public void setUtilisateurs(Set<Utilisateur> utilisateurs) {
		this.utilisateurs = utilisateurs;
	}
 
}
y'a t-il une idée svp je suis bloqué