cancel
Showing results for 
Search instead for 
Did you mean: 

Please give me an example about ImpEx update using [batchmode =true] and not using [batchmode =true]

phatphan
Explorer
0 Kudos

Can any body help me about it. I read https://wiki.hybris.com/pages/viewpage.action?spaceKey=release5&title=ImpEx+Syntax#ImpExSyntax-Attri... , but not understand

Please give me an example about ImpEx update using [batchmode =true] and not using using [batchmode =true]

former_member624549
Participant

a technical explanation: impex constructs a sql query to fetch records. the unique=true columns will be in the where clause. With batchmode=false a single record is expected. With batchmode=true all records matching the unique columns are processed.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member620692
Active Contributor

Example of using [batchmode=true]:

 $productCatalog=defaultProductCatalog
 $catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default=$productCatalog:Staged]
 
 UPDATE Product[batchmode=true];itemType(code)[unique=true];$catalogVersion;appovalstatus(code)[default='approved']
 ;Product;

The ImpEx given above will update approvalStatus for all products in defaultProductCatalog.

Any ImpEx with header mode as UPDATE but not having [batchmode=true] with it, is an example of UPDATE without using [batchmode=true] because batchmode is by default false.