I'm going to review your changes. However, you shouldn't be mapping collections that have 100k records. In this case, even if you load it lazily, you'd still be loading 100k results from the DB. In this case, it makes more sense to use a @ManyToOne association and just rely on queries to fetch just as much data that you need. Pagination is also much easier to be done with queries than with associations. |