Hi,
so I've been working on adding the creation attributes to the
versioned feature collection. The result is that the versioned
features have now 8 extra attributes, that is version, author,
date and message relating both to the feature creation and the
last update.
The result looks like the following:
<topp:archsites fid="archsites.1">
<topp:creationVersion>1</topp:creationVersion>
<topp:creationDate>2007-12-21T11:41:47.64</topp:creationDate>
<topp:creationMessage>
Version enabling archsites
</topp:creationMessage>
<topp:lastUpdateVersion>7</topp:lastUpdateVersion>
<topp:lastUpdatedBy>anonymous</topp:lastUpdatedBy>
<topp:lastUpdateDate>2007-12-21T12:10:34.328</topp:lastUpdateDate>
<topp:lastUpdateMessage>
Updating Signature rock label
</topp:lastUpdateMessage>
<topp:cat>1</topp:cat>
<topp:str1>Signature Rock, updated</topp:str1>
<topp:the_geom>
<gml:Point
srsName="http://www.opengis.net/gml/srs/epsg.xml#26713">
<gml:coordinates xmlns:gml="http://www.opengis.net/gml"
decimal="." cs="," ts=" ">
593493,4914730
</gml:coordinates>
</gml:Point>
</topp:the_geom>
</topp:archsites>
the above misses topp:createdBy because the creation refers to
the actual process of version enabling the feature type,
that was carried out automatically.
Sebastian, is this what you needed for your project?
If so, ask the latest geoserver build. Unfortunately to
support the above I also needed to change the database schema,
so you have two alternatives:
* drop and recreate the database from scratch, and let the
datastore version enabled it (or create another one
so that you can go back to the old one in case something
does not work).
* alter the db.
The second alternative requires the following. Say you have
the "river" table that has been version enabled by the
old datastore. You have to run the following:
alter table river add column created bigint references changesets(revision);
update river
set created = (
select min(r2.revision)
from river r2
where r2.fid = river.fid
);
alter table river alter column created set not null;
If the river_vfc_view is around you also have to drop it:
drop view river_vfc_view;
This has to be done for every table that has been
version enabled.
Let me know how this works for you. Unfortunately I still
do not have unit testing set up so I could only do some
interactive tests.
Cheers
Andrea