Hi,
i wonder has anyone encountered this before?
Supposed i have this POJO as below
Code:
private String id; //PK
private Date createddate;
private String updatedby;
private Date updateddate;
private char deleted;
//Init my Bean
Object rates = new Object();
rates.id("2");
rates.setCreateddate(sqlDate);
rates.setBcc("1");
Then i Created a QBE
Code:
Criteria criteria = PersistenceUtil.currentSession().createCriteria(
"Rates";
criteria.add(Example.create(rates).ignoreCase());
How come i get this in my SQL generated by Hibernate
(lower(this_.BCC)=? and this_.CREATEDDATE=? and this_.DELETED=?)
Basically there are two things above.
1. I set my Id which is my primary key , why it dont appear in the SQL
2. how come the DELETED condition come out when i never set it in my BEAN. I guess because HIbernate thinks char is a primitive type so it couldnt compare it to null thats why hibernate includes it.
But when i see my log it binds ' ' to my DELETED field
How to solve this??
Thanks.