I am trying to map the result of a native query with joins to Projection (Interface) which is not an entity. I have to map Postgres array codes| text[]|
to String[] getCodes(); in projection interface. With Entity, it can easily be mapped defining types below and then annotating the properties
@TypeDef(
name = "string-array",
typeClass = StringArrayType.class
)
})
But the same seems not working with projections. Is there any way to do the same with projection without casting the array to text in the query itself?