Hi,
Is it possible to do something like:
SELECT CASE TYPE(v) WHEN CarEntity THEN new test.CarBean(v.id) ELSE new test.VehicleBean(v.id) END FROM VehicleEntity v
where I have two entities "VehicleEntity" and "CarEntity extends VehicleEntity"? CarBean and VehicleBean are to simple classes.
I currently do get a parser exception (near "THEN") from the QueryTranslaterImpl.parse(...). Returning either only the CarBean or the VehicleBean without any "CASE" work fine. Also returning only v.id within WHEN and ELSE (without the new) works fine. There also seems to be an issue when using different properties (like v.name and v.id in different WHEN/ELSE sections).
Thanks, Regards Remo
|