Where is Scaffolding data stored?
Is it possible to access Scaffolding data directly in the database?
3
people have this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company marked this question as answered.
The best answer from the company
-
Scaffolding data is stored in table OS_PROPERTYENTRY with entity_id as foreign key to CONTENT.contentid. The history/versioning of Confluence leads to many entries with the same OS_PROPERTYENTRY.entity_id. The latest/current version is the entry with OS_PROPERTYENTRY.entity_key = "~metadata." + n, where n = CONTENT.version.
Here is an SQL example to get latest version of a page's Scaffolding data:
select c.contentid, c.title, c.version, o.text_val
from CONTENT c, OS_PROPERTYENTRY o
where c.title='My Page' and c.prevver is NULL and c.contentid=o.entity_id and o.entity_key=concat('~metadata.',c.version)
Contributed by Bernd Lindner.
The company says
this answers the question
-
Inappropriate?Scaffolding data is stored in table OS_PROPERTYENTRY with entity_id as foreign key to CONTENT.contentid. The history/versioning of Confluence leads to many entries with the same OS_PROPERTYENTRY.entity_id. The latest/current version is the entry with OS_PROPERTYENTRY.entity_key = "~metadata." + n, where n = CONTENT.version.
Here is an SQL example to get latest version of a page's Scaffolding data:
select c.contentid, c.title, c.version, o.text_val
from CONTENT c, OS_PROPERTYENTRY o
where c.title='My Page' and c.prevver is NULL and c.contentid=o.entity_id and o.entity_key=concat('~metadata.',c.version)
Contributed by Bernd Lindner.
The company says
this answers the question
-
Inappropriate?Hi,
And how do you store the number of rows on each table-data macro? We have a serious problem with this now...
Thanks!
I’m stressed
-
Hi Oscar, missed this question, sorry. The number of rows is stored as '.count' I believe, with each of the rows being '.X'. They are actually stored in a Map, not a list, which might be a bit confusing... -
Inappropriate?ok thanks.
I'm getting the point.
Seems really hard to make diffrerence between one field and another...
Michael -
Inappropriate?As in, you want to request a single field directly from the database? Yeah, that's difficult. The whole page is stored as an XML document, essentially.
If you want to get individual values out for use in a plugin, the simplest thing is to use the Metadata Library, which makes it easy to get the right data for the current version of the page.
Loading Profile...


EMPLOYEE

