'How to map array_agg to list
I have this
select array_agg(distinct cast(square as float8))
and in class this
@Type(type = "list-array")
@Column(
name = "square_range",
columnDefinition = "float8[]"
)
private LinkedList<Double> squareRange;
but after getting it throws this
org.springframework.orm.jpa.JpaSystemException: Could not set field value [[30.0, 500.0, 6780.0, 20.0, 30.0]] value by reflection : [class com.dwelow.common.data.entity.pseudo.PropertyListItem.squareRange] setter of com.dwelow.common.data.entity.pseudo.PropertyListItem.squareRange; nested exception is org.hibernate.PropertyAccessException: Could not set field value [[30.0, 500.0, 6780.0, 20.0, 30.0]] value by reflection : [class com.dwelow.common.data.entity.pseudo.PropertyListItem.squareRange] setter of com.dwelow.common.data.entity.pseudo.PropertyListItem.squareRange
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
