Meaningless Drivel is fun!*
The moose likes Object Relational Mapping and the fly likes making hibernate query [select] using null value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "making hibernate query [select] using null value" Watch "making hibernate query [select] using null value" New topic

making hibernate query [select] using null value

Ahmed M. Omar
Ranch Hand

Joined: Mar 02, 2010
Posts: 43
i am using hibernate 3 all i want to achieve is to make a query using select and in the where clause there is a property may be null, if this property is null at run time it throws Null Pointer Exception at the statement that set this property please tell me how can i do it .

this the code :

and this is the exception i got:

the exception is thrown at line 9 in the code

subject: making hibernate query [select] using null value
Similar Threads
Can use validator classes within action's validation methods?
java.lang.ClassNotFoundException: javax.ejb.EJBHome
Could not initialize class thats under WEB-INF
How to resolve"java.sql.SQLException: Network error IOException: Connection refused: connect"
Null Pointer Exception