How do I recover data in Alfresco after a data model change -


i hoping has experienced before.

i have data model in alfresco defines few types , few aspects.

for example type x has mandatory aspects , b.

as part of developing application on top, need add new aspect type x. when add new mandatory aspect , deploy amp model, existing data type x no longer show in new queries trying join on aspect x.

does know seamless way fix this?

ideally script run analyze model, match type names, , apply missing aspects instances of type. way model evolve 1 script evolve data, , of our queries evolve data model in coherent path.

here example...

so lets have query our type x

select p:namespace:aspect.namespace.propertya  namespace:typex primary   join namespace:aspect p:namespace:aspect       on primary.cmis:objectid=p:namespace:aspect.cmis:objectid 

anytime make object x have aspect applied since mandatory. few weeks later add mandatory aspect2. , need property b it...

select p:namespace:aspect.namespace.propertya, p:namespace:aspect2.namespace.propertyb  namespace:typex primary   join namespace:aspect p:namespace:aspect       on primary.cmis:objectid=p:namespace:aspect.cmis:objectid  join namespace:aspect2 p:namespace:aspect2       on primary.cmis:objectid=p:namespace:aspect2.cmis:objectid 

our query has evolved our data model, old instances of typex not returned since not have aspect2 applied yet. our theory can run script apply missing aspects without versioning; , seamlessly evolve our content our application.

ok, got problem query kind of making mandatory have both aspect on content , why not showing old contents not have new aspect b. see 2 option deal it.

  1. you can create rule on root folder , using add aspect existing contents. pretty simple solution.
  2. you can modify query in such way accomodate old contents, may through left inner join.(i not queries :) )

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -