I am a beginner in hibernate, in my perisistent entity I have a function like this:
@Override
@Transactional
public void setStatus(String status) {
this.status = status;
}
and I call it like this in another class:
class1.function1
abcs.forEach(abc -> abc.setStatus("WORKING"));
class2.function2
abcs.forEach(abc -> abc.setStatus("SUCCESS"));
but the abcs
didn’t be update in function2, they are still “WORKING” status, what might have happened here?
How to make abc
change to “SUCCESS”?