diff --git a/src/main/java/wtf/beatrice/releasehive/HiveMain.java b/src/main/java/wtf/beatrice/releasehive/HiveMain.java index fcbab03..a474e4c 100644 --- a/src/main/java/wtf/beatrice/releasehive/HiveMain.java +++ b/src/main/java/wtf/beatrice/releasehive/HiveMain.java @@ -7,6 +7,7 @@ import org.hibernate.Transaction; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import wtf.beatrice.releasehive.db.HibernateManager; +import wtf.beatrice.releasehive.dtos.UserDto; import wtf.beatrice.releasehive.models.User; import java.util.List; @@ -30,7 +31,7 @@ public class HiveMain { Session session = HibernateManager.getSession(); Transaction transaction = session.beginTransaction(); - List users = session.createQuery("FROM User", User.class).getResultList(); + List users = session.createQuery("FROM User", UserDto.class).getResultList(); transaction.commit(); StringBuilder usersListBuilder = new StringBuilder("[");