Skip to Content

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

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?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jul 13, 2020 at 08:41 AM

    This attribute onlineDate is defined at Product and not MyProduct, so this is inherited and will not be allowed, so, use Product instead of MyProduct

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.