This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes iBATIS multiple parameterClass Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "iBATIS multiple parameterClass" Watch "iBATIS multiple parameterClass" New topic

iBATIS multiple parameterClass

Alex Belisle Turcot
Ranch Hand

Joined: Apr 26, 2005
Posts: 516

I'm new to iBATIS and I'm developing "myFirstiBATIS" project.

I have a table of user/password and a table of user/roles.
One user can have multiple roles. In my Java model, I have a User class, a username, password and a list of Roles (ArrayList of Strings).

To insert a user, I pass my User class as parameterClass.. this is fine.
-> insert username, password..

After that, I want to do multiple inserts for each role. How can I do that ? I need to pass the role and the username as parameter ?
insert user1, role1
insert user1, role2
insert user1, role3

Firstly, is it possible to pass more than 1 parameterClass? Or to iterate through the list for multiple inserts ?

I hope I was clear enough so you understand what I'm looking for.

Tania Bhushan

Joined: Apr 04, 2008
Posts: 1

Did you get a solution to this.. I am stuck in the same problem?
I agree. Here's the link:
subject: iBATIS multiple parameterClass
Similar Threads
HTTP Status 403 Access to the requested resource has been denied
iBatis, AS400: generated primary key value in code
wildcard for tomcat-users.xml users
privileges in oracle database
Studying HeadFirst book: cannot make authentification