Adding a constructor with all attributes of the class did the trick, now the execution times are 70ms for the hibernate query. Previously the class only had a default constructor without arguments and a constructor with the entity id argument.
More Related Contents:
- Hibernate show real SQL [duplicate]
- Difference between FetchType LAZY and EAGER in Java Persistence API?
- Why is Hibernate Open Session in View considered a bad practice?
- Wrong ordering in generated table in jpa
- In which case do you use the JPA @JoinTable annotation?
- Hibernate – A collection with cascade=”all-delete-orphan” was no longer referenced by the owning entity instance
- How can you call custom database functions with Hibernate?
- JPA: Implementing Model Hierarchy – @MappedSuperclass vs. @Inheritance
- How to prevent SQL Injection with JPA and Hibernate?
- Hibernate order by with nulls last
- @Id @GeneratedValue but set own ID value
- Difference between save and saveAndFlush in Spring data jpa
- Inherited abstract class with JPA (+Hibernate)
- Difference between @MapKey, @MapKeyColumn and @MapKeyJoinColumn in JPA and Hibernate
- Different representation of UUID in Java Hibernate and SQL Server
- Why hibernate generates insert and update for OneToMany mapping
- Connection cannot be cast to oracle.jdbc.OracleConnection
- Name attribute in @Entity and @Table
- Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
- org.hibernate.annotations.Entity deprecated in Hibernate 4?
- PSQLException: ERROR: relation “TABLE_NAME” does not exist
- Why should anybody put annotations on the getters or setters when using JPA to map the classes?
- Hibernate using JPA (annotated Entities) and liquibase
- Mapping JPA or Hibernate projection query to DTO (Data Transfer Object)
- JPA: Override Auto generated ID [duplicate]
- HQL recursion, how do I do this?
- org.dbunit.dataset.NoSuchTableException: Did not find table ‘xxx’ in schema ‘null’
- Registering a SQL function with JPA and Hibernate
- TransactionRequiredException Executing an update/delete query
- Getting Hibernate and SQL Server to play nice with VARCHAR and NVARCHAR