I have @OneToMany relationship between FabricRoll and FabricDefect.
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) @JoinColumn(name = "fabric_roll_id", referencedColumnName = "fabric_roll_id") private Set<FabricDefect> fabricDefects = new HashSet<>(); The problem is when I get FabricRoll by JpaRepository function
findAll()
the associate FabricDefect is also loaded.
I want to load only FabricRoll and FabricDefect should load when calling the function getFabricDefect()