SQL queries use column names while HQL queries use Class properties. You’re selecting artifact_id from Classification but the Classification class has no property named ‘artifact_id’. To fix it, use the class property in your HQL.
SELECT artifactId FROM Classification
Related Contents:
- JPA and Hibernate – Criteria vs. JPQL or HQL
- What is the difference between JOIN and JOIN FETCH when using JPA and Hibernate
- How do you do a limit query in JPQL or HQL?
- JpaRepository Not supported for DML operations [delete query]
- IN-clause in HQL or Java Persistence Query Language
- Found shared references to a collection org.hibernate.HibernateException
- Hibernate criteria: Joining table without a mapped association
- ORDER BY using Criteria API
- org.hibernate.NonUniqueResultException: query did not return a unique result: 2?
- Hibernate HQL Query : How to set a Collection as a named parameter of a Query?
- Not supported for DML operations with JPA update query
- One-To-Many relationship gets duplicate objects without using “distinct”. Why?
- How do I write hql query with cast?
- HQL left join of un-related entities
- Hibernate throws MultipleBagFetchException – cannot simultaneously fetch multiple bags
- Hibernate SessionFactory vs. JPA EntityManagerFactory
- How can I make a JPA OneToOne relation lazy
- How to map a composite key with JPA and Hibernate?
- How to change a field name in JSON using Jackson
- What is lazy loading in Hibernate?
- What is “the inverse side of the association” in a bidirectional JPA OneToMany/ManyToOne association?
- How do I call the default deserializer from a custom deserializer in Jackson
- What’s the use of session.flush() in Hibernate
- JPA: what is the proper pattern for iterating over large result sets?
- How to generate the JPA entity Metamodel?
- Specifying an Index (Non-Unique Key) Using JPA
- How to remove entity with ManyToMany relationship in JPA (and corresponding join table rows)?
- Exception NoClassDefFoundError for CacheProvider
- Mapping PostgreSQL JSON column to a Hibernate entity property
- What is the “owning side” in an ORM mapping?
- Validation error: “No validator could be found for type: java.lang.Integer”
- Repository Pattern – How to understand it and how does it work with “complex” entities?
- Connecting PostgreSQL 9.2.1 with Hibernate
- JPA: How to get entity based on field value other than ID?
- How can I mark a foreign key constraint using Hibernate annotations?
- Deprecated createCriteria method in Hibernate 5
- How to get SQL from Hibernate Criteria API (*not* for logging)
- Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
- How to get distinct results in hibernate with joins and row-based limiting (paging)?
- JPA vs ORM vs Hibernate?
- Spring Boot – Handle to Hibernate SessionFactory
- Getting Database connection in pure JPA setup
- Hibernate, iBatis, Java EE or other Java ORM tool
- What is difference between setMaxResults and setFetchSize in org.hibernate.Query?
- How to map a PostgreSQL array with Hibernate
- How to test whether lazy loaded JPA collection is initialized?
- JPA – How to set string column to varchar(max) in DDL
- Force a transactional rollback without encountering an exception?
- Disable the log from specific class/jar via logback.xml
- JPA/Hibernate Native Queries do not recognize Parameters