Skip to Content
author's profile photo Former Member
Former Member

Does old typecode store the references for the old data ?

My typecode for one of the tables was changed by mistake (from 10014 to 10015). Now, if I change it back to 10014 and deploy, will it store the old instances (PKs) created by 10014 typecode ?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2017 at 04:31 PM

    Short answer: No.

    You have corrupted your database. If you need to recover the data you want to get the old (incorrect typecode) items' PK re-coded for the correct typecode. I recommend you try to

    1. ImpEx export them under the incorrect (10015) typecode, so that it properly references the type, then change the typecode,

    2. delete the exported items with bogus typecode/PK from the database

    3. restore the typecode to the correct value

    4. ImpEx import the items from step 1.

    The PK embeds the typecode at the time the item is persisted, and PKs are treated as immutable, so the solution will require regenerating new PKs with the correct typecode for the affected items.

    Please review the relevant documentation. https://help.hybris.com/6.5.0/hcd/8c2900ca866910149dcbff62f8ab736f.html https://help.hybris.com/6.5.0/hcd/8c2d4abd866910149207b2f33deaf652.html

    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.