cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to enable "copy by value" in synchronization configuration

bidyadhar_tripathy
Participant
0 Kudos
2,125

Hi All,

We can enable copy by value configuration in backoffice in System->Multithreaded Synchronization->edit configuration.

Is there any other way to configure it like impex ?

I see default value of "copy by value" is false. so to make it true do we need to use backoffice or any impex ? or will it be enabled to true based on data model configuration in items.xml.

Accepted Solutions (1)

Accepted Solutions (1)

arvind-kumar_avinash
Active Contributor
0 Kudos

Hi - please use an ImpEx like the one given below:

 UPDATE SyncAttributeDescriptorConfig;syncJob(code)[unique=true,path-delimiter=!];attributeDescriptor(enclosingType(code),qualifier)[unique=true];includedInSync;copyByValue
  ;"sync electronicsProductCatalog:Staged->Online";Product:manufacturerName;true;true
bidyadhar_tripathy
Participant
0 Kudos

Hi Arvind,

Thank you for your response. In our project I see few of the product->collection[custom-type] attributes has "copy by value" true in sync config though there is no impex for that.

So Will it be enabled based on items.xml configuration. ?

arvind-kumar_avinash
Active Contributor
0 Kudos

Yes, it should work. I just tested my ImpEx and it worked perfectly for the mentioned attribute. Is it that you want to ask something which I am not able to get? If yes, please elaborate a little bit more so that I can pinpoint the problem/requirement.

bidyadhar_tripathy
Participant
0 Kudos

Hi Arvind,

I have tried your impex and it is working fine.

My question is if you don't set "copy by value" to "true" via backoffice/impex then will it be set to "true" based on attribute/relation definition in items.xml ?

In our project I see few of the product->collection[custom-type] attributes has "copy by value" as "true" in sync config even though there are no backoffice changes /impex written for them.

arvind-kumar_avinash
Active Contributor
0 Kudos

My question is if you don't set "copy by value" to "true" via backoffice/impex then will it be set to "true" based on attribute/relation definition in items.xml ?

No, not as per the OOTB definition in items.xml. Given below is the OOTB definition and it does not mention the default value as true which means it will default to false.

 <attribute qualifier="copyByValue" type="java.lang.Boolean">
     <modifiers read="true" write="true" initial="false" optional="false"/>
     <persistence type="property"/>
 </attribute>

However, you should check spring config file, if it is being set to be true something like:

 <bean class="de.hybris.platform.commerceservices.setup.data.EditSyncAttributeDescriptorData">
     <property name="copyByValue" value="true"/>
     <property name="qualifier" value="galleryImages"/>
 </bean>

Answers (0)