How to return only one column in Hibernate?
I want to return only one column from table. This is my DAO:
@SuppressWarnings("unchecked")
public String getUri() {
return sessionFactory.getCurrentSession()
.createQuery("uri from Templates WHERE state=1").toString();
}
Console says:
Request processing failed; nested exception is
java.lang.IllegalArgumentException: node to traverse cannot be null!
No comments:
Post a Comment