I am using Hibernate Envers 4.2, I want to fetch the revisions of entity with only details from some of the collections in the Entity.
But I could see hibernate queries fired for all collections in the Entity causing performance problems.
Also could not use @NotAudited annotation for the collections to avoid in this particular query as the auditing is desired in other scenarios for those collections.
For example, if my Audited Entity has these two joins as collections. But I want the query getting revisions of my entity to fetch only address information and ignore Order information, is it possible? I don't want to annotate Order information with @NotAudited since the history information may be desired in other scenarios.
@ManyToOne
@JoinColumn(name="ADDR_ID")
public Address getAddress() { return address; }
@OneToMany
@JoinColumn(name="CUST_ID")
public Set<Order> getOrders() {return orders;}