I'm trying to get records in my Transaction table where the message is not empty and not null. It's working on my MySQL DB but it's not working in Oracle DB. Since I think Oracle is treating empty as null.
public List<Transaction> getAllTransactions() {
return getEntityManager()
.createQuery("from Transaction as transaction where transaction.message != null AND transaction.message != ''", Transaction.class)
.getResultList();
}
How can I make this work on both MySQL and Oracle?