RLH-19 - Use UserDto in init query
All checks were successful
continuous-integration/drone Build is passing
All checks were successful
continuous-integration/drone Build is passing
This commit is contained in:
parent
5a706e56ae
commit
211aa26df1
@ -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<User> users = session.createQuery("FROM User", User.class).getResultList();
|
||||
List<UserDto> users = session.createQuery("FROM User", UserDto.class).getResultList();
|
||||
transaction.commit();
|
||||
|
||||
StringBuilder usersListBuilder = new StringBuilder("[");
|
||||
|
Loading…
Reference in New Issue
Block a user