ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: how to write selectByExample and get info from 2 tables?
Date Fri, 12 Oct 2007 19:23:22 GMT
Abator won't write queries that join tables, so you would have to write this
by hand.

Or, you could define a view that joined the two tables and then use Abator
to generate code from the view.  That would be pretty simple.

Jeff Butler


On 10/12/07, xianwinwin <xianwinwin@gmail.com> wrote:
>
>
> Hi all,
>
> given the following 2 trivial tables:
> 1 - user (user_id, fname, lname)
> 2 - messages (message_id, user_id,  user_message)
>
> I wonder if it is possible to use selectByExample and get:
>
> user_message, fname, lname
>
> As you can see, this is a combination of 2 tables.
>
> Is this doable???, if not, what other alternative exists beside writing
> the
> queries (gee, that will take such a long time)
>
> thanks
> xww
> --
> View this message in context:
> http://www.nabble.com/how-to-write-selectByExample-and-get-info-from-2-tables--tf4614193.html#a13177049
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>

Mime
View raw message