Quantcast

Could you help me?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Could you help me?

Tomas Garijo

Hello I'm new in mybatis.

I have these tables

table1.id, table1.name
1, tom

table2,id, table2.tlf, table2.idtable1
1,2,1
2,3,1

I'd like one Java.List with one record of table1 and other records with table2
because when i do a select of table1 with join to table2 I get two records
1,tom,1,2,1
1,tom,2,3,1

Best Regards

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Could you help me?

Jose María Zaragoza
2016-10-24 16:18 GMT+02:00 Tomas Garijo <[hidden email]>:

>
> Hello I'm new in mybatis.
>
> I have these tables
>
> table1.id, table1.name
> 1, tom
>
> table2,id, table2.tlf, table2.idtable1
> 1,2,1
> 2,3,1
>
> I'd like one Java.List with one record of table1 and other records with
> table2
> because when i do a select of table1 with join to table2 I get two records
> 1,tom,1,2,1
> 1,tom,2,3,1
>
> Best Regards

Take a look at

http://www.mybatis.org/mybatis-3/sqlmap-xml.html

, on association section

Regards



>
> --
> You received this message because you are subscribed to the Google Groups
> "mybatis-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...