code: @Override
      public T create(T entity) {
          EntityManager entityManager = getEntityManager();
          entityManager.persist(entity);
          return entity;
      }
docs: Creates an entity in the database. It calls
  {@link EntityManager#persist(java.lang.Object) } and throws the same
  exceptions.
  
  @param entity the entity to create.
  
  @return the created entity with any primary key field populated.