• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

iBATIS multiple parameterClass

 
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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.

thanks,
Alex
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Did you get a solution to this.. I am stuck in the same problem?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic