Have 1 PostgreSQL table look like following
int id,
int[] childIds
How can I map childIds
to a List
in Java entity?
class A {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column
private int id;
@Type(type = "int-array")
@Column(name = "childIds")
private List<Integer> childIds;
}
Got following error when trying to build the code
Caused by: java.lang.ClassNotFoundException: Could not load requested class : int-array