@Transactional
  public void create(List<PrincipalEntity> entities) {
    for (PrincipalEntity entity: entities) {
      entityManagerProvider.get().persist(entity);
    }
  }
Make instances managed and persistent.

@param entities entities to store
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/PrincipalDAO.java