Salut à tous,
Je débute en java-EJB3 et j’ai un souci d’implémentation pour la gestion des autorisations. Un user a un role. Un rôle a plusieurs profiles : User[1]-> [1-*] Role [1] -> [1-*]Profil
J’ai donc les classes suivantes :
Les Roles :
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
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
Les profiles :
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
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
65
66
Dans le session bean, je fais l’update suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
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
Quand j’execute cette méthode, j’ai l’erreur suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
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
Est-ce que vous avez une idée ?22:31:54,968 WARN [JDBCExceptionReporter] SQL Error: 1364, SQLState: HY000
22:31:54,968 ERROR [JDBCExceptionReporter] Field 'PROFIL_ID' doesn't have a default value
22:31:54,968 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
…
Caused by: java.sql.BatchUpdateException: Field 'PROFIL_ID' doesn't have a default value
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1213)
…
22:31:54,984 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2] TwoPhaseCoordinator.beforeCompletion - failed for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@1bb4422
javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update

 

 
		
		 
        

 
			
			

 
   


 Relation n-air en EJB3
 Relation n-air en EJB3
				 Répondre avec citation
  Répondre avec citation
Partager