-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Is there a way to map idexed list with duplicates?
PostPosted: Tue Jun 10, 2008 5:24 am 
Beginner
Beginner

Joined: Fri Jun 09, 2006 4:21 pm
Posts: 23
Location: Reading
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;
    }


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.