Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 515229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:36:24+00:00 2026-05-13T07:36:24+00:00

I have a two ibatis sql maps that are linked together via a sub

  • 0

I have a two ibatis sql maps that are linked together via a sub select like the simplified example below:

<resultMap id="order" class="Order">
  <collection property="orderLines" ofType="OrderLine" resultMap=”orderLine”/>
</resultMap>

I have an order object that contains a collection of line objects that are returned by a join and an association. I wish to perform some row handler functionality on every line that is returned by the nested association that returns the order lines.

I know that this can be achieved by passing in a IListRowHandler to the queryWithRowHandler call when calling the spring sqlmapclienttemplate for a query for just a list of OrderLine objects, but this does not allow me to use a rowhandler on the subselect collection when making a call only on the parent sql map, order in this example.

Is there any way to declaritively assign a rowhandler class to a specific resultmap or select statement within an ibatis sql map? As this is the kind of functionality i feel should be there. Or alternatively i am open to suggestions on modifying each instance of the row objects returned by the sub select as they are returned rather than interrogating the fully built order object and manipulating them after the fact.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:36:24+00:00Added an answer on May 13, 2026 at 7:36 am

    I have had a look through the iBatis documentation for something that will suit without success.

    So i have implemented the following solution:

    On the Order.setOrderLines(collection orderLines) method that is populated via ibatis as a result of the query execution, I have implemented a handler method that manipulates each of the orderLines within the collection that is about to be set on the Order.

    This doesn’t do achieve the interception of each nested object as it is instantiated and before it is added to the collection, but it does the job, and performs it early enough and in a query agnostic way so that it is activated any time a query utilises the Order resultMap as a return value.

    I’m happy to mark any declarative type solution that perform the task as I first wanted as the answer, if someone comes forward with one!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 369k
  • Answers 370k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I have no SQL server to test here, but addBindValue()… May 14, 2026 at 6:32 pm
  • Editorial Team
    Editorial Team added an answer The geo fix command of the emulator isn't accurate enough… May 14, 2026 at 6:32 pm
  • Editorial Team
    Editorial Team added an answer RewriteCond is applied to exactly one rewrite rule. To match… May 14, 2026 at 6:32 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.