Bug 438 : BeanSet of sub type with inheritance has null listen mode
Priority 
High
Reported Version 
 
Logged By 
Daryl Stultz
Status 
Fixed
Fixed Version 
github
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
13/12/2012
Updated 
13/12/2012
Type 
Bug
 
Attachments 
No attachments

I have an entity (User) with a collection like so:

@ManyToMany(cascade = CascadeType.PERSIST)
@JoinTable(name = "userroles",
joinColumns = { @JoinColumn(name = "userid", referencedColumnName = "userid") },
inverseJoinColumns = { @JoinColumn(name = "roleid", referencedColumnName = "roleid") }
)
private Set validRoles;

This works fine. Role extends AbstractRole. If I change the sub-type of validRoles to Role, changes are not tracked. When I instantiate a new User, the ModifyListenMode of validRoles is ALL. After the user is loaded via a query or by find(class, id) the ModifyListenMode is null. This results in changes not being tracked and the many-to-many table not being updated.

 
woResponse

Upload a file