I am inserting object A in database with parameter (A a). The object like that
A {
List<B> b;
List<C> c;
}
In mapper file I use this function:
void register(@Param("a")A a);
In mapper.xml, I wrote the following code:
<insert id="registerB" parameterType="java.util.List">
<foreach>...</foreach>
</insert>
<insert id="registerC" parameterType="java.util.List">
<foreach>...</foreach>
</insert>
<insert id="register">
//TODO include insert registerB and registerC
</insert>
How can i include the inserting of list of B and C into insert query of A?