We have entities (top-entity) with sub-entities and can't use Open Session In View Filter because we modify entities in our service layer but we don't wan't those changes to be persistent. We persist only what we want by calling dao.update!
On the other hand if we don't use open session in view filter our sub-entities are not correct ones.
Is there some workaround to force GWT not to call findEntity() on sub-entities if we instant those sub-entities in top entity!
Example:
public class User {
private Long id;
private Long version;
private String name;
Address address;
/* Getters and Setters */
public static User findUser(Long id){
//load from db User with Address
}
}
public class Address {
private Long id;
private Long version;
private String name;
/* Getters and Setters */
public static Address findAddress(Long id){
// GWT calls this method although i have allready populated address
}
}