I have a search form that needs to include results from two different tables. The tables have no relationship to each other and our separate. In my example scenario, we have gas
After much googling, I figured out the answer to my own question.
The ibatis discriminator will pick between the gasStation and groceryStore classes.
<resultMap id="searchResultMap" class="Store">
<discriminator column="storeType" javaType="java.lang.String">
<subMap value="grocery" resultMap="groceryStoreMap"/>
<subMap value="gasStation" resultMap="gasStationMap"/>
</discriminator>
</resultMap>
I would then edit my query to add storeType in the select field and create a resultMap for the groceryStore and gasStation.
Note - to figure this out, I read this stackoverflow question.