iBatis 3 - Managing 1:N Instert
===

I searched on google to find a way, if exists, to insert multiple row with one query in iBatis 3.

SITUATION

I have a classic 1:N situation.

    TABLE PM
    id_pm
    id_sender
    text
    creation_date
    
    TABLE PM_USER
    id_pm
    id_user
    read_status

A single PM may be sent to multiple user.
I have a java class like:
   

            private long idPm;
            private long idSender;
            private String text;
            private Date creationDate;
            private boolean readStatus;
            private List<long> idUsers;
            private long idUser;

Before calling Dao, my object is fully filled with data.

In have create two insert statement. One for first table and one for second table.
The property idPm is filled by iBatis after the first query so I can write a for on idUsers launching the insert in the second table.

Is there a way to allow iBatis make all this stuff with one query? An internal for statement?

This is the query for the first table:

    <insert id="insert" parameterType="Pm" useGeneratedKeys="true" keyProperty="id">
        <selectKey keyProperty="idPm" resultType="long" order="BEFORE">
            SELECT PM_SEQ.NEXTVAL FROM DUAL
        </selectKey>
    	insert into PM (ID,ID_SENDER,CREATION_DATE,TEXT) 
    	values (#{idPm},#{idSender},#{creationDate},#{text})
    </insert>

And then the query for second table. NOTE: In java for, I set single idUser

    <insert id="insertPmUser" parameterType="Pm">
    	insert into PM_USER (ID_PM,ID_USER,READ_STATUS) values 
    	(#{idPm},#{idUser},#{readStatus})
    </insert>

	
Thanks.