Storagetab storagetab;
try {
storagetab = em.getReference(Storagetab.class, id);
storagetab.getStoragetabPK();
} catch (EntityNotFoundException enfe) {
throw new NonexistentEntityException("The storagetab with id " + id + " no longer exists.", enfe);
}
Inventory inventoryID = storagetab.getInventoryID();
if (inventoryID != null) {
inventoryID.getStoragetabCollection().remove(storagetab);
inventoryID = em.merge(inventoryID);