Return Multiple Types from a Single ibatis Query

前端 未结 1 341
耶瑟儿~
耶瑟儿~ 2021-01-23 13:10

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

1条回答
  •  有刺的猬
    2021-01-23 13:36

    After much googling, I figured out the answer to my own question.

    The ibatis discriminator will pick between the gasStation and groceryStore classes.

    
         
               
               
         
    
    

    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.

    0 讨论(0)
提交回复
热议问题