Problem while inserting multiple nodes

Hi.

We are using Tamino 4.4.1 + Update + Hotfix, so we have the latest release possilbe.

We would like to make several inserts in one query.

We tried the following queries

[color=“blue”]*********************************************************

update for $oplan in input()/oplan
where $oplan/@id_oplan = ‘54’
do (
insert
and
and
and
following $oplan/user[last()]
)


update for $oplan in input()/oplan
where $oplan/@id_oplan = ‘54’
do (
insert
and
and
and
into $oplan
)


update for $oplan in input()/oplan
where $oplan/@id_oplan = ‘54’
do (
insert
into $oplan
insert
into $oplan
insert
into $oplan
insert
into $oplan
)

*********************************************************[/color]

but without success, although the X-query tool tells us the query is well formed.
Queries, tsd and error message are available in the attached zip file.

Can some one help me ?

Thanks a lot.

Jerome
probleme_tamino_update_massif.zip (3.6 KB)

Hi,

I do not believe that the query does not have any effect, but I bet it does not have the effect youu expect. You insert


<user id_user='eurocis_Consultant_CACIOPE_3' profile='manager'/>
and <user id_user='eurocis_Consultant_CACIOPE_1' profile='writer'/>
and <user id_user='eurocis_ema_ADMIN_SI' profile='reader'/>
and <user id_user='eurocis_Gest_CACIOPE_2' profile='manager'/>

which is a boolean expression (that happens to evaluate to “true”). The value true is inserted - please check. I guess what you want to achieve is addiing multiple elements. then please use the following query:


update for $oplan in input()/oplan 
where $oplan/@id_oplan = '54' 
do (
insert (<user id_user='eurocis_Consultant_CACIOPE_3' profile='manager'/>,
<user id_user='eurocis_Consultant_CACIOPE_1' profile='writer'/>
,<user id_user='eurocis_ema_ADMIN_SI' profile='reader'/>
,<user id_user='eurocis_Gest_CACIOPE_2' profile='manager'/>)
following $oplan/*[last()]
)