Register / Login
Object Relational Mapping
Hibernate query with Hardcoded result
posted 6 years ago
Can you tell how do I write a hibernate query like
name = "John";
List list = session.createSQLQuery("Select '+ name +' as Name from Emp")
FYI: In EmpBean class I have String getter and setter method for name.
In this query expecting char setter and getter in EmpBean class, because of single quote.
and when i try to add addScalar("name", Hibernate.STRING) its showing that deprecated.
Can you please let me know how do i manage this case.
Unit testing using dbunit
Getter and Setter In Java Bean
Hiding member !
how to get data from alias
Calling stored procedure from hibernate