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
0000000000000000000010000000101011000111110010001000000000010111
(64 bit presentation).
Now, take out last 14 digit and comes as 00000000010111. Convert it
in decimal and you’ll get the typecode (23). The 43rd bit represent
if the PK is counter based (if the value is 1 which is in this example) or UUID
based (if the value is 0).
Pk In Item Models In Hybris >>>>> Download Now
ReplyDelete>>>>> Download Full
Pk In Item Models In Hybris >>>>> Download LINK
>>>>> Download Now
Pk In Item Models In Hybris >>>>> Download Full
>>>>> Download LINK Jx