Clone
Marcin Cieslak
committed
on 18 Oct 21
LDEV-4411 Make relation from Evaluation to ToolActivity unidirectional
Hibernate can not lazy load properties connected with OneToOne
relati… Show more
LDEV-4411 Make relation from Evaluation to ToolActivity unidirectional

Hibernate can not lazy load properties connected with OneToOne

relationship. It means that with every fetch of ToolActivity its

ActivityEvaluation was also fetched, whether is was needed or not. It

made up even 10% of all queries sent to DB during a lesson.

By having the relationship unidirectional and fetching

ActivityEvaluation via DAO we ensure that it is fetched only when it is

needed. The code is not as nice, though. Show less