I'm having trouble with properties in a view that have underscores in the name, they always return as null.
Here is the code:
business_status_summary_view:
business_name | business_id | status | ...
reposity:
...
@Query(nativeQuery = true, value = "SELECT * "
+ "FROM business_status_summary_view WHERE business_id IN ?1")
List<BusinessClientListView> test(Iterable<Long> ids);
...
My view looks like this, which I'm returning directly to the front end:
public interface BusinessClientListView {
public Long getBusinessId();
@JsonProperty("business_name")
String getBusinessName();
@JsonProperty("status")
String getStatus();
}
In the above view, I'm tyring with and without @JsonProperty for the business_id and business_name, but both are still null, status always works fine and I've confirmed the data is there.
Can this be mapped without having to change my view columns and remove all underscores?