Try our conversational search powered by Generative AI!

Which database column stores this Content ID value? (Commerce 12.12)

Vote:
 

There is a value shown in Episerver admin -> Commerce catalog tree -> (any) catalog node -> Edit -> ID, Type

I can't find what table or column the value "ID" comes from. I thought it was tblContent.pkId (in CMS db) but I cannot find it there. (The value shown has 10 digits whereas tblContent.pkId goes up to around 6 digits.) I've already spent a good while searching online and through our databases, maybe someone here knows? Thanks!

#265000
Oct 13, 2021 14:56
Vote:
 

Commerce items aren't stored in the CMS database, they are in the Commerce database. You'll find the IDs in either the CatalogEntry table for Products/Variants or the CatalogNode table for Categories/NodeContent

#265004
Oct 13, 2021 15:28
Sujit Senapati - Oct 13, 2021 17:18
@Scott, I believe Hampus is asking about the complex content reference Id of the catalog. E.g. -2147483647

~ Sujit
Vote:
 

Hi @Hampus,

That value in catalog Id is calculated based on Integer.MinValue + catalog Id.

Sum of Min value i.e. -2147483648 and your catalog Id (e.g. 1/2/3/4 etc). Hope that answers your question.

~ Sujit

#265007
Edited, Oct 13, 2021 17:26
Vote:
 

Thanks for your replies. I wanted to uploaded a picture in this editor but I cannot get it to work. The field I'm referring to is a read-only value that is shown in the editor form. In my setup it looks like this:

Display name Visible to
Name Languages
Name in URL ID, Type
SEO URL Tools
Code

The content being edited is a Catalog node, which has the value ID = 1073744761. However, the column [CatalogNode].CatalogNodeId (in Commerce db) for this row has the value 2937. In a debugger, the value 1073744761 also happens to be the ID value of a ContentReference to this Catalog node.

Where does the value 1073744761 come from?

#265049
Oct 14, 2021 6:41
Vote:
 

For a catalog node this value is 1073741824 + ID of item in the CatalogNode table

For a catalog entry this value maps 1 to 1 with the ID of the item in the CatalogEntry table

#265065
Edited, Oct 14, 2021 8:57
Vote:
 

Usually everything is referred to when using the API by the ContentReference whatever you do and you use th ReferenceConverter to convert it between the commerce IDs and a ContentReference. If you decompile the ReferenceConverter you can see how it's coverting

#265066
Oct 14, 2021 8:59
Vote:
 

Interesting, thanks a lot!

#265078
Oct 14, 2021 12:22
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.