Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

JPAContainer NPE when refreshItem is called

iXo  
1 decade ago Jan 19, 2012 5:17pm
Matti Tahvonen
1 decade ago Jan 19, 2012 6:54pm
iXo  
1 decade ago Jan 19, 2012 9:36pm
iXo  
1 decade ago Jan 20, 2012 8:34am

Nevermind, I manage to solve my problem.

In fact my entity have a @OneToMany relation, and also, a @PostLoad function that try to find the last item of the OneToMany relation.

When I was using the container.refresh() method, it failed with StackOverflowError, that's why I tryied to solve my problem with the loop on the items in the container.

But I manage to solve my problem, by adding a fetch = FetchType.EAGER on my @OneToMany relation, and now, everything works !!!

Thanks !