id summary reporter owner description type status priority milestone component version resolution keywords cc 1745 BioMaterial.getParent() return null after changing the (single) parent of a biomaterial Nicklas Nordborg Nicklas Nordborg "A biomaterial that has a single parent is a special case since that information is also stored in the `BioMaterials` table (`parent_id` column). Biomaterials with no or multiple parents have null in this column. The parent information is in all cases also stored in the `BioMaterialEventSources2` table. When using the web gui to switch the parent for a biomaterial that has a single parent, the new parent is added first and the old parent is then removed. The problem is that adding the new parent makes the biomaterial to have two parents and the `parent_id` column is cleared. When the old parent is removed the column is never populated with the id of the new parent. The result is that the `BioMaterial.hasSingleParent()` method return false, and the `BioMaterial.getParent()` return null. The workaround in the web interface is to first remove the old parent, save and then add the new parent in a second edit operation. The BASE core code need to be fixed so that removing parent items also triggers an update to the `parent_id` column when there is only one left." defect closed major BASE 3.2.2 core fixed