Hopefully this is fairly simple.
Seam 2.1.1GA
JBAS 4.2.3GA
I have a nested conversation page flow where I have Entity A which is related to Entity B
On my page I update the association so that entity B is now related to entity C. (A is no longer related)
The page flow however does an endAndRedirect to take me back a page displaying entity A...which is still showing the relationship to B.
The actual layout of this is a page flow where you select an organization, then a site, then a voiceGroup. These are all conversations nesting so that the breadcrumbs show something like this.
Organization List > Organization > Site > Voice Group
So I'm changing the site which the Voice Group is associated to. The problem is the entity for the first site (A) isn't being refreshed.
I've tried: setting cascade = CascadeType.All on my getter/setters for the association
On VoiceGroup.java
@ManyToOne(cascade = CascadeType.ALL) @JoinColumn(name = "site_id", nullable = false) public Site getSite() { return site; } public void setSite(Site site) { this.site = site; }
On Site.java
@OneToMany(mappedBy="site", fetch = FetchType.LAZY, cascade = CascadeType.ALL) @OrderBy("name") public List<VoiceGroup> getVoiceGroups() { return voiceGroups; } public void setVoiceGroups(List<VoiceGroup> voiceGroups) { this.voiceGroups = voiceGroups; }
But it doesn't seem to be refreshing the former site entity. Is there an easy way to handle this?