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