AnsweredAssumed Answered

Data Dictionary, clean repository questions

Question asked by zulu on May 15, 2012
Latest reply on May 18, 2012 by zulu
Hi everyone,

I've been monkeying around a lot lately with custom data models, and I've found it's generally pretty clear how it all hangs together.  I started by a static model extension and moved on to using the Model Designer addon from BeCPG which seems targeted at dynamic model changes.  That designer seems pretty good, but it's given me a few new ways to shoot myself in the foot too.  I'm good at that!

1.  I had published a new model in the data dictionary which seemed to be behaving properly.  I then tried adding another model based on the first with a few changes.  Immediately thereafter everything basically quit working.  Upon restart, alfresco webapp showed complaints about duplicate namespaces referring to the namespace from my first model (repeated in the second).  So it seems clear I need to either update or remove the second model that I added.  How do I go about doing this when Alfresco won't start though?  Can I find the document in alf_data and remove/modify it directly?  Is there a recognized way to clear any custom models in the Data Dictionary?  I had been verifying my models using org.alfresco.repo.dictionary.TestModel when they were static models; is there a way to basically verify all custom models together?

2.  With all the model testing I've done, I've added data that uses things I no longer want in my model.  How are subtractive model changes handled in Alfresco?  Do you have to remove any content that uses the removed elements?  Is there a clever way to do that?  In a previous DM system I'd go hack the database but I really don't want to do that if I can avoid it.

3.  At some point I imagine I'll be happy with the data model and essentially want to slick the whole repository.  I've done alot of googling, but I can't seem to find a procedure for doing that.  Any advice on where to look or how to basically reset my Alfresco instance at a data level?

Have had some great advice from here, and as always, appreciate any and all feedback.