Skip to main content

Posts

Showing posts from June, 2018

PK in item models in Hybris

While working with model, the property of modelservice amazes me is, if you search an item with PK, you’ll get the result. If the item is search in HMC or backoffice, while returning the search result, it also gives the type code. How is this possible? All the items are stored in single DB table? In that case also, how come when a deleted item is searched, it returns the type code? See the screen shot below where item is deleted and item search returns type code Fig – 1: Searching item (System-Types-Items)        Fig 2: The PK is appended with Type code defined in items.xml PK is generated with the following combination. ·        Type code       Time stamp (create time) If you make the PK in binary number and take last 14 digit and convert back to decimal and you’ll get the type code. Consider the example I have. PK is 8842394501143. If I convert in Binary, it comes as 0000000000000000000010...