-->
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: OneToMany - BatchedTooManyRowsAffectedException
PostPosted: Tue Sep 21, 2010 3:29 pm 
Newbie

Joined: Tue Sep 14, 2010 3:08 pm
Posts: 3
I have the following OneToMany relationship defined in my entity object. I want to be able to add more II items to the values list.
Code:
@OneToMany(fetch=FetchType.EAGER)
    @JoinTable(name="IOV",
        joinColumns = @JoinColumn(name="o_id", referencedColumnName="id"),
        inverseJoinColumns = @JoinColumn(name="externalId", referencedColumnName="pn")
    )
    @IndexColumn(name = "position")
    @XStreamOmitField
private List<II> values;


However if I add more II items to the values list then the following exception is thrown.

Code:
Batch update returned unexpected row count from update [7]; actual row count: 2; expected: 1; nested exception is org.hibernate.jdbc.BatchedTooManyRowsAffectedException: Batch update returned unexpected row count from update [7]; actual row count: 2; expected: 1


Not sure what the problem is. Any ideas on how I can resolve it.

Thanks.


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.