Following is my code Here I am using multiple lists to fetch data from database. On fetching data from hql query it is showing exception.
Pojo Class
I used the new annotation @OrderColumn instead of @IndexColumn (deprecated see: https://docs.jboss.org/hibernate/orm/5.2/javadocs/org/hibernate/annotations/IndexColumn.html) and it works now.
Annotate one of the collections with @OrderColumn e.g.
@ManyToMany(cascade = CascadeType.ALL)
@OrderColumn
private List addresses = Lists.newArrayList();
@Builder.Default
@ManyToMany(cascade = CascadeType.ALL)
private List bankAccounts = Lists.newArrayList();