Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DefaultOperators.NotNull

    Hi Isomorphic,

    please take a look at this one. (v12.0p_2019-04-03/PowerEdition Deployment (built 2019-04-03)

    Code:
        public DSResponse fetch(DSRequest request, HttpServletRequest servletRequest) throws Exception {
            request.addToCriteria("itemName", DefaultOperators.NotNull);
            return request.execute();
        }
    Query looks like:
    Code:
    SELECT COUNT(*) FROM supplyItem WHERE (LOWER(supplyItem.itemName)='com.isomorphic.criteria.defaultoperators$28@1fec8737')
    Always return "List with 0 items".

    Best regards
    Pavo

    #2
    According to docs, this is maybe correct.

    Alternative is
    Code:
        public DSResponse fetch(DSRequest request, HttpServletRequest servletRequest) throws Exception {
            request.addToCriteria(new NotNullCriterion("itemName"));
            return request.execute();
        }
    and it works fine.

    Comment


      #3
      Just to confirm, your first attempt is just incorrect - that signature takes fieldName, value so when you pass an operator constant as the value, that's what you get as the value.

      Comment

      Working...
      X