Skip to Content
1
Aug 21, 2018 at 02:26 PM

How do I sync a Product's Online Date, but not the Variant's Online Date?

323 Views

How do I sync a Product's Online Date, but not the Variant's Online Date? I have a MyProduct, which is a subclass of Product. I also have a MyVariant, which is a concrete subclass of VariantProduct.

NOTE: onlineDate is an OOTB attribute of Product

I am looking to do something like this:

 INSERT_UPDATE SyncAttributeDescriptorConfig;syncJob(code)[unique=true][path-delimiter=!];attributeDescriptor(enclosingType(code), qualifier)[unique=true];includedInSync;copyByValue
 # Sync Product's Online Date
 ;MySyncJob;MyProduct:onlineDate;true;true
 # DO NOT sync variant's Online Date
 ;MySyncJob;MyVariant:onlineDate;false;false

Unfortunately, I get a warke this:

 INFO   | jvm 1    | main    | 2018/08/21 19:43:29.731 | 0821_19:43:29,647 WARN  [ImpExResultProcessWorker] (00000000-ImpEx-Import)  [de.hybris.platform.impex.jalo.imp.ImpExImportReader.dumpUnresolvedLine:811] line 3 at main script: dumped unresolved line ValueLine[unresolvable:line 3: cannot create SyncAttributeDescriptorConfig with values ItemAttributeMap[ registry:  null, type: <null>, data: {syncjob=MySyncJob(8796095414772), copybyvalue=true, includedinsync=true, attributedescriptor=MyProduct.onlineDate:java.util.Date[/rwoSRp]} ] due to [de.hybris.platform.catalog.impl.SyncAttributeDescriptorConfigValidator@139e7948]:Attribute AttributeDescriptorModel (8796237725783) is inherited - use the declared one.,line 3 at main script,null,HeaderDescriptor[line 2 at main script, insert_update, SyncAttributeDescriptorConfig, {}, [syncJob, attributeDescriptor, includedInSync, copyByValue] ],{1=ValueEntry('MySyncJob'=MySyncJob(8796095414772),unresolved=false,ignore=false), 2=ValueEntry('MyProduct:onlineDate'=MyProduct.onlineDate:java.util.Date[/rwoSRp],unresolved=false,ignore=false), 3=ValueEntry('true'=true,unresolved=false,ignore=false), 4=ValueEntry('true'=true,unresolved=false,ignore=false)}]
 INFO   | jvm 1    | main    | 2018/08/21 19:43:29.731 | 0821_19:43:29,647 WARN  [ImpExResultProcessWorker] (00000000-ImpEx-Import)  [de.hybris.platform.impex.jalo.imp.ImpExImportReader.dumpUnresolvedLine:811] line 4 at main script: dumped unresolved line ValueLine[unresolvable:line 4: cannot create SyncAttributeDescriptorConfig with values ItemAttributeMap[ registry:  null, type: <null>, data: {syncjob=MySyncJob(8796095414772), copybyvalue=false, includedinsync=false, attributedescriptor=MyVariant.onlineDate:java.util.Date[/rwoSRp]} ] due to [de.hybris.platform.catalog.impl.SyncAttributeDescriptorConfigValidator@139e7948]:Attribute AttributeDescriptorModel (8796267872343) is inherited - use the declared one.,line 4 at main script,null,HeaderDescriptor[line 2 at main script, insert_update, SyncAttributeDescriptorConfig, {}, [syncJob, attributeDescriptor, includedInSync, copyByValue] ],{1=ValueEntry('MySyncJob'=MySyncJob(8796095414772),unresolved=false,ignore=false), 2=ValueEntry('MyVariant:onlineDate'=MyVariant.onlineDate:java.util.Date[/rwoSRp],unresolved=false,ignore=false), 3=ValueEntry('false'=false,unresolved=false,ignore=false), 4=ValueEntry('false'=false,unresolved=false,ignore=false)}]

Is what I want even possible with Hybris OOTB?