I have JPQL/Hibernate for DA layer.
I have a table as following:
CREATE TABLE Log_Tbl
(
id number,
name varchar2(30),
);
and I have a entity for above table as following:
@Entity
@Table(name = "Log_Tbl")
public class ELog
{
@Column(name = "id")
private long entity_id;
@Column(name = "name")
private String entity_name;
}
and map Log entity to Log_Tbl table by jpa;
I have two JPQL queries as following:
select ELog from ELog where entity_name = 'Job'select ELog from ELog where name = 'Job'
Both queries returned the correct result. My question is:
Why does the second query return the correct result although I used the column name instead of the entity_name property?
JPAimplementation? (in my situation itsHibernate)