In HQL it is possible to use constants (like below) for DTO projection. This i however not possible (yet) in Panache.
@Entity
@Table(schema = "DINO_DBA", name = "GDW_LKS_SFR_RD")
@NamedQuery(
name = "GdwLksSfrRd.search",
query = "select new nl.bro.microservices.dlp.model.common.ObjectDto( p.broId, p.geometry, 'SOIL', 'BRO', 'sfr' ) "
+ "from GdwLksSfrRd p where p.broId like :criterion order by p.broId"
)
Description
In HQL it is possible to use constants (like below) for DTO projection. This i however not possible (yet) in Panache.
See also https://github.com/quarkusio/quarkus/issues/33310
Implementation ideas
A suggestion that has been made in https://github.com/quarkusio/quarkus/issues/33310 is to support static factory methods. That looks like an interesting way forward.