I have a test case which I will add shortly. In short, this works:
cb.construct(NameHolder.class, e.get(Employee_.name));
but this throws NullPointerException:
cb.construct(NameHolder.class,
cb.function("IFNULL", String.class, e.get(Employee_.name), cb.literal("(Unknown)")));
The exception looks like this:
Note, this may be related to this similar bug reported on stackoverflow. |