In reality item.setFolder and folder.getItems().add are called as necessary by the framework when loading objects from the db. The above implementation o f setFolder adds every item a second time resulting in a list containg every item twice. Removing the