I have a file which i want to import to the postgres database. I know i can do it with jdbc and copymanager.
My Question is, how can i do it when i'm using JPA.
EntityManager em = JpaUtil.createEntityManager();
em.getTransaction().begin();
System.out.println(file2);
Query copyQuery = em.createQuery("COPY temp_import FROM STDIN WITH DELIMITER E'\t'" +file2);
This isn't working.
Thanks for Help.