Foren
Liferay 6.2 Journal Article Id and id_ relation
Frank Wang, geändert vor 7 Jahren.
Liferay 6.2 Journal Article Id and id_ relation
New Member Beiträge: 3 Beitrittsdatum: 01.02.16 Neueste Beiträge
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
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
Jorge Díaz, geändert vor 7 Jahren.
RE: Liferay 6.2 Journal Article Id and id_ relation
Liferay Master Beiträge: 753 Beitrittsdatum: 09.01.14 Neueste Beiträge
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:
The ids are generated from a internal Liferay counter and they are never reused.
- 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.