Bug #60 (closed)
Opened 18 years ago
Closed 18 years ago
addLink creates a new Set for unloaded collections.
Reported by: | jamoore | Owned by: | jamoore |
---|---|---|---|
Priority: | critical | Cc: | cxallan |
Sprint: | n.a. | ||
Total Remaining Time: | n.a. |
Description
If a collection is unloaded ( Object.typeLinks ) and a new item is linked (e.g.
Project.addDataset( dataset ) ), then the addTYPE method initializes the
typeLinks set to new HashSet?();
This will thoroughly confuse the backend.
This needs to either:
- Throw an exception.
- Intialize the field and set it to "filtered". The backend will need to be changed to find the new member.
In resurrect, this was leading to the "only one addable user" bug. Basically doing,
for ( User user : users ) { group = server.getGroup() user.linkGroup( group ) server.save( user ) }
would only store the last user, because the serialized version of group from the
server had a nulled out users (Experimenters) java.util.Set.
Originally : http://bugs.openmicroscopy.org.uk/show_bug.cgi?id=666
Change History (1)
comment:1 Changed 18 years ago by jmoore
- Resolution set to fixed
- Status changed from new to closed
r662 removed the problem spots, basically calls of the form:
are now:
This will most certainly cause exceptions where there were none before, but will prevent corrupt data (especially spurious deletes!)