}
@Override
public void grantRole(RoleModel role) {
if (hasRole(role)) return;
UserRoleMappingEntity entity = new UserRoleMappingEntity();
entity.setUser(getUser());
entity.setRoleId(role.getId());
em.persist(entity);
em.flush();
em.detach(entity);
}