How to use mybatis realize one-to-any ER?

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

How to use mybatis realize one-to-any ER?

Jason Hoo
bus_1,bus_2,bus_3…is business data tables,and theirs primary key are id.
trn is public transaction record data table,and its primary key is id also,and use bus_tpye to associate which business it is,bus_id to associate the specified record.

Mybatis has associate and collection to realize one-to-one and one-to-many ER.Could you help me to realize the one-to-any,except use SQL and set by myself ?Thanks!

--
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: How to use mybatis realize one-to-any ER?

Guy Rouillier-2
Take a look in the MyBatis User Guide.  Sounds like discriminator, under
advanced result maps, is the feature you are looking for.

--
Guy Rouillier



------ Original Message ------
From: "Jason Hoo" <[hidden email]>
To: "mybatis-user" <[hidden email]>
Sent: 2/9/2017 9:43:11 PM
Subject: How to use mybatis realize one-to-any ER?

>bus_1,bus_2,bus_3…is business data tables,and theirs primary key are
>id.
>trn is public transaction record data table,and its primary key is id
>also,and use bus_tpye to associate which business it is,bus_id to
>associate the specified record.
>
>Mybatis has associate and collection to realize one-to-one and
>one-to-many ER.Could you help me to realize the one-to-any,except use
>SQL and set by myself ?Thanks!
>
>--
>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...