• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Expression (builder Expression Oring between null and inteer value)

 
Mohammad Noor Najdawi
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
i want to ask if we can get through expression (with expressionbuilder) null object OR integer value
expression = builder.get(null object). or(builder.get(integer value));

is that noraml and will work correctly, or not.

thanks all

 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your expression is not valid, but you should be able to check a value for null.

expression = builder.get("age").isNull().or(builder.get("age").equal(18));
 
Mohammad Noor Najdawi
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actully i test the get (null object) value in expression alone and i got the null results correctlly, and i test also the get (integer ) value alone and i get the result correctlly, but when i get them through one expression with or it bring only the get ( integer values)

thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic