[jboss-jira] [JBoss JIRA] Created: (EJBTHREE-960) CascadeType REMOVE in relationships doesn't appear to cascade anymore.
Fritz Feuerbacher (JIRA)
jira-events at lists.jboss.org
Fri May 11 15:37:52 EDT 2007
CascadeType REMOVE in relationships doesn't appear to cascade anymore.
----------------------------------------------------------------------
Key: EJBTHREE-960
URL: http://jira.jboss.com/jira/browse/EJBTHREE-960
Project: EJB 3.0
Issue Type: Bug
Environment: Windows XP, JBoss AS 4.0.5.GA
Reporter: Fritz Feuerbacher
Since I upgraded from JBoss 4.0.4.GA to 4.0.5.GA I have encountered this problem.
Whenever I have an entity bean that has a relation in it I get strange behavior that I didn't have in 4.0.4.GA.
Examples:
Say I have an entity bean with a relation in it like:
@OneToMany (mappedBy="user",
cascade={cascadeType.ALL}),
fetch=fetchType.EAGER)
public List<UserAndRole> getUserAndRoles()
{
return userAndRoles;
}
This works fine, and will cascade in all instances except if I take an existing bean
and set the list to an empty list like:
userAndRoles = new ArrayList<UserAndRole>();
and then call merge on the entity bean. It appears to remove the relationship in the the bean, however, the old entries in the table are still there. In JBoss 4.0.4.GA, doing this would also remove the entries in the UserAndRoles table that corresponded to the items that were in the original userAndRoles list. Definately something has changed between the versions. I just can't figure out what.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list