Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 2 of 2

Thread: Mapping entity (product) questions

  1. #1
    Ankush Garg is offline Junior Member
    Join Date
    Feb 2010
    Posts
    7

    Default Mapping entity (product) questions

    Hi,

    In products say i want to update only the category mappings for a product:

    <AspDotNetStorefrontImport Verbose="true" UseImplicitTransactions="true">
    <Product Action="Update" ID="187">
    <Mappings AutoCleanup="true" PreserveExistingRecords="true">
    <Entity EntityType="Category" ID="42"/>
    <Entity EntityType="Category" ID="43"/>
    </Mappings>
    </Product>
    </AspDotNetStorefrontImport>

    If autocleanup is given as true then it cleans up all the mappings for the product (manufacturer, section, etc.) and not just the category. Is there any way by which only the categories are cleaned up when this update is done?

    If autocleanup is false then nothing is cleaned up (as expected) and PreserveExistingRecords has not effect for either true or false. Is this expected or it should still work with autocleanup being set to true?

    Thanks in advance.

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    If you are still looking for an answer, try using the <ClearMappings EntityType="Category"> node.

    Full syntax:
    <ClearMappings EntityType="Manufacturer|Distributor|Category|Sect ion|Genre|Vector" ID="integer" GUID="uniqueidentifier"/>

    From the example above, that will clear all product mappings to any given entity.