This content has been marked as final.
Show 7 replies
-
1. Re: Problem with AuditQuery + @OneToMany and FetchType.EAGER
adamw Jul 13, 2009 1:47 AM (in response to soudmaijer)Hello,
as for now all relations are loaded lazily by Envers.
Adam -
2. Re: Problem with AuditQuery + @OneToMany and FetchType.EAGER
varunmehta Jul 24, 2009 5:24 PM (in response to soudmaijer)So just to clarify, even if I mark them eager, it'll lazy load them. I'll need to explicitly call them and "assemble" them in my dao/service layer.
-
3. Re: Problem with AuditQuery + @OneToMany and FetchType.EAGER
sunky Jul 27, 2009 6:27 AM (in response to soudmaijer)Maybe you can modify the code like the following to resolve the problem(change the type List tojava.util.Set)
@Audited public class Order { ... @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER) private Set<OrderItem> orderItem; ... }
-
4. Re: Problem with AuditQuery + @OneToMany and FetchType.EAGER
varunmehta Jul 27, 2009 12:01 PM (in response to soudmaijer)Should changing from List to Set make a difference ?
-
5. Re: Problem with AuditQuery + @OneToMany and FetchType.EAGER
sunky Jul 27, 2009 11:44 PM (in response to soudmaijer)I spent 1 day to resolve this but only find Changing from Collection to Set can make it work well. Maybe there is other solution I do not know. You can try it.
-
6. Re: Problem with AuditQuery + @OneToMany and FetchType.EAGER
soudmaijer Jul 28, 2009 7:20 AM (in response to soudmaijer)"adamw" wrote:
Hello,
as for now all relations are loaded lazily by Envers.
Adam
Even if the Entity relation is mapped EAGER? I think this is confusing. Don`t get me wrong, I like envers, but this behaviour is not what you would expect. -
7. Re: Problem with AuditQuery + @OneToMany and FetchType.EAGER
adamw Jul 28, 2009 7:31 AM (in response to soudmaijer)Hello,
yes, always ;). I know that it would be better to handle it differently, but that's not so easy :)
Adam