title: How do you handle sql mapping for multiple tables in ibatis and java
body: <p>I am trying to use Ibatis with GWT and I have this scenario,  I have databases tables Airport, Terminals and Flights. An airport can have different terminals. A terminal can have one Airport and many flights. And a flight can have one terminal. So the table structure looks like this.</p>
  
  <p>Airport
  -id
  -name
  -terminal_id</p>
  
  <p>Terminals
  -id
  -name
  -flight_id</p>
  
  <p>Flights
  -id
  -airline
  -terminal_id</p>
  
  <p>My select statement looks like this</p>
  
  <pre><code>SELECT airport.name AS Airport,
         terminals.name AS Terminal,
         flights.airline,
  FROM airport,
       terminals,
       flights
  WHERE airport.terminal_id = terminals.id
    AND terminals.flight_id = flights.id;
  </code></pre>
  
  <p>What will the sql maps look like to get this result. Where I'm getting confused is the result set is a combination of tables and so the result set isn't a model object of either of the three tables.</p>