That's what I think...
In a ideal world, removing a class or a property should imply removing associated instances naturally...
Another idea...One question: are classes and properties versioned as documents? I mean, if you modify a class, is it possible to keep the previous version and keep existing objects as instantiations of the older version and then new objects will be instantiations of the newer version of the class? We could also propose an object to be translated into the newer version with some risks.
In this case, it could be simple to modify or remove properties of a class even if it would bring some complexity also...
Then the last problem would be class deletion which would be more violent and would need some strong warnings because objects would be deleted definitely... in this case, a kind of temporary bin could be interesting...
Pascal
Pascal Voitot wrote:We don't know what to do with the data. Adding a property is simple,
> This might seem stupid but what are the limitations in class/object
> deletion?
>
existing objects will not have a property and it will be added when the
object is saved. But when you delete a property, what do we do? Leave it
there? Delete it from all the objects?
If we keep it there, it will be "shadowed", as the persistence layer
will not know that it exists. More, if we add back that property with
the same name and another type, we'll have errors because we'll have two
instances with the same identifier in two places (this is what happened
when switching number types or the multiselect metaproperty of a list
property).
If we remove it, then we'll completely remove a lot of data. And is a
warning enough for that? Probably we need a mass rollback utility that
is able to revert bulk changes.
My take is that we should remove the data, but what do others think?
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs