Hi,
I need to map a list (java.util.List) that would allow duplicates and were indexed (had index column).
The problem I'm having is that apparently using @IndexColumn doesn't allow duplicates, and whenever I insert duplicate element in the collection I get the following error:
Quote:
Caused by: java.sql.BatchUpdateException: Duplicate entry '4' for key 'banners'
Could some-kind-one point me to the doc which explains how to get it working? Any help is appreciated.
ps. Are there any alternative solutions to having an indexed list with duplicates allowed?
Here is my current mapping
Code:
@OneToMany(cascade = CascadeType.ALL)
@IndexColumn(name = "ind")
public List<Banner> getBanners() {
return banners;
}