f
This commit is contained in:
@@ -161,11 +161,11 @@ public class UserManagerBean implements IUserManager{
|
|||||||
this.UpdateUser(user);
|
this.UpdateUser(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeSpecialityToUser(int specialityId, String login){
|
public void removeSpecialityFromUser(int specialityId, String login){
|
||||||
Query query = em.createQuery("delete from User u, u.specialities s WHERE s = ? and u = ?");
|
User user = this.getUser(login);
|
||||||
query.setParameter(1, this.getSpeciality(specialityId));
|
Speciality spe = this.getSpeciality(specialityId);
|
||||||
query.setParameter(2, this.getUser(login));
|
user.getSpecialities().remove(spe);
|
||||||
query.executeUpdate();
|
this.UpdateUser(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
|||||||
Reference in New Issue
Block a user