Fórum

Liferay 6.2 Journal Article Id and id_ relation

Frank Wang, modificado 7 Anos atrás.

Liferay 6.2 Journal Article Id and id_ relation

New Member Postagens: 3 Data de Entrada: 01/02/16 Postagens Recentes
Hello,

Does some know about how liferay generate the Web Content id by default?

Let's see, in table "journalarticle", there are two fields, "id_" and "articleId". The first type is "BIGINT" and the second type is "Varchar". What is the relationship between these two?

If you can point me at the source code, I will be more appreciated.

Thanks.
Frank
thumbnail
Jorge Díaz, modificado 7 Anos atrás.

RE: Liferay 6.2 Journal Article Id and id_ relation

Liferay Master Postagens: 753 Data de Entrada: 09/01/14 Postagens Recentes
There are three ID attributes in JournalArticle:
- id_ => id of one individual web content version (all versions have different id_)
- articleId => id of whole web content (all versions have same articleId)
- resourcePrimKey => link to JournalArticleResource it is also the same id for all versions.

So for example, you will have in JournalArticle:
  • version 1: id_ = 100 ; articleId = 120 ; resourcePrimKey = 140 ; version = 1.0
  • version 2: id_ = 234 ; articleId = 120 ; resourcePrimKey = 140 ; version = 1.1
  • version 3: id_ = 356 ; articleId = 120 ; resourcePrimKey = 140 ; version = 1.2


The ids are generated from a internal Liferay counter and they are never reused.