Message Boards

RestrictionsFactoryUtil.ne method in Liferay 7.3 fails with empty spaces

Kevin Neibarger, modified 2 Years ago.

RestrictionsFactoryUtil.ne method in Liferay 7.3 fails with empty spaces

Regular Member Posts: 105 Join Date: 2/2/18 Recent Posts

So, I'm converting my companies flagship product from Liferay 6.2 to Liferay 7.3 GA7 and I've noticed either a possible bug or something that's been removed. I'm just wondering if anything replaces the old functionality. 

In 6.2, I would call a DynamicQuery using the OR Junction and appending the following

junction.add(RestrictionsFactoryUtil.ne("<COLUMN_NAME>", ""));

It would always return results, but after converting to 7.3, it returns 0 results every time.. I noticed it when generating a list of state codes. Occasionally when we load data into our DB we will have an empty space for a row. We can clean this up, but sometimes it may be needed per the DB admins. What's odd, is that is no errors, the query just returns 0 results. When I remove that line it works fine. 

I was wondering, is this a bug or something that was removed?