This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
what could cause the list to return null? is it my database mapping or what? i get my message as null
Joined: Feb 15, 2005
I suspect it's the Hibernate query that's not returning anything. Are you sure the database table actually has rows? Are you sure your hibernate query is valid? Is THREAD_ID a string? if so, append single quotes around the id. Having a property named THREAD_ID is very non-standard. Are you sure that's the right property name for your Hibernate POJO?
Joined: Oct 15, 2006
i have tried this: String sql="from Message"; lMessage = HibernateAction.search(sql);
my pojo is name as Message.java
when i print out the lMessage, it is [null,null]. im able get the size of the list which is 2 in this case. what went wrong?