Foros de discusión

Liferay 6.2 Journal Article Id and id_ relation

Frank Wang, modificado hace 7 años.

Liferay 6.2 Journal Article Id and id_ relation

New Member Mensajes: 3 Fecha de incorporación: 1/02/16 Mensajes recientes
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 hace 7 años.

RE: Liferay 6.2 Journal Article Id and id_ relation

Liferay Master Mensajes: 753 Fecha de incorporación: 9/01/14 Mensajes recientes
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.