class CollectionDao extends HibernateDao<Collection, String> {

   public void removeProduct (final String cid, final Long pid, User user)
   {
      Collection collection = read(cid);
      if (collection == null)
      {
         LOGGER.warn("Unknown collection #" + cid);
         return;
      }
      Product product = productDao.read(pid);
      if (product == null)
      {
         LOGGER.warn("Unknown product #" + pid);
         return;
      }

      Hibernate.initialize (collection.getProducts());
      collection.getProducts().remove(product);
      update(collection);

      fireProductRemoved (new DaoEvent<> (collection), product);
   }

}