Skip to content
Advertisement

java.lang.IllegalArgumentException: Result Maps collection already contains value for

Hey I’m using Mybatis with Spring Annotations.

and getting this error:

JavaScript

here is the domain class (sans getters and setters):

JavaScript

here is my Mapper.Java class

JavaScript

lastly here is the Mapper.xml

JavaScript

I’m inclined to believe there is something wrong with the xml select statement. Probably with how I am using foreach. I have another mapper using a similar format it just does not use for each and it is not having any problems.

Advertisement

Answer

Yep It looks like there was an error somewhere in my select statement. I ended up just rewriting it a different way.

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement