Answer the question
In order to leave comments, you need to log in
Spring Data, LazyInitializationException which pattern to use?
There is a certain Entity class Operation, containing a list of stages objects, marked with the @ManyToMany annotation.
For this class, a repository interface was created inherited from JpaRepository without any additional methods.
public interface OperationTypeRepository extends JpaRepository<OperationType,Long> {
}
public OperationType read(Long id) {
return repository.getOne(id);
}
OperationType otFromBase = typeCrudService.read(ot1.getId());
otFromBase.getOperStages();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question