0

I have lets say Entity A with a @OneToMany relationship with Entity B. Therefore I have a List entityBlist; that I want to display on a JSF datatable for each Entity A;

This means that I will have to use a "getter" in the EL expression #{backingbean.entityA.entityBlist}

This will obviously cause an exception. Is the only way to resolve this is to replace the getter with an HQL JOIN Fetch statement?

1 Answer 1

1

Rather than call the getter in your view, create a new POJO that is constructed from the entityList and use that object in your view. This way, you can use the lazy load functionality of hibernate.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.