I'm seeing an issue with cacheing. I'm not sure if this is a setting to be altered using hibernate or something else.
So on a login screen i have some stats i'm showing to the user, one being their favorite venues.
Code:
@ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH}, fetch=FetchType.EAGER)
@org.hibernate.annotations.Cascade(value = {org.hibernate.annotations.CascadeType.SAVE_UPDATE})
public Set<VenueEnt> getFavoriteVenues() {
return favoriteVenues;
}
after i navigate to a new page and add a new venue to my favorites (using DWR ajax), i can see the new values being added to the DB.
When i return to the login page, i dont see the updated list. I thought that those cascade settings would force hibernate to requery the list.
Here is the code on the page.
Code:
<% Set<VenueEnt> favs = user.getFavoriteVenues();
for (VenueEnt v : favs){
out.println("<li><a href='Venue?venueId=" + v.getId() + "'>" + v.getName() + "</a></li>");
}
%>
I should also mention that after a forced refresh (F5 or CTRL R) the results stay the same :(
Thanks