Menu

#7 Renaming features breaks existing model instances

open
nobody
None
5
2010-06-17
2010-06-17
No

Create a new xOCL project
Model a class with a string attribute and a reference to the root class
Implement the model
Run it
Set the attribute and the reference for the root object
Save the instance and close it
Go back to the model
Rename the attribute and the reference
Re-implement the model and run it
pen you previously created instance

TableEditor breaks complaining it cannot find the old features.

Not sure how to treat this actually. Maybe we should just issue a warning and
open the instance omitting the fields that are not there.

The ideal solution would be to somehow to figure out the renaming and act
accordingly, but I realize it is probably impossible.

The TableEditor should not break completely though, it should allow you to edit
what can be recovered from the existing instance.

Discussion

  • Massimiliano Zattera

    Example fo the problem

     
  • Massimiliano Zattera

    ...this also happens if you delete a feature.

     

Log in to post a comment.