Forum Stats

  • 3,732,985 Users
  • 2,246,665 Discussions
  • 7,856,453 Comments

Discussions

Deleting mappings with transformation scripts

Does anyone have experience with transformation scripts regarding mappings? i have a function that sets mappings accordingly:


RelationalDesign.getRMExtendedMap().createMapping(entity, table);

RelationalDesign.getRMExtendedMap().createMapping(attribute, column);


this works good so far - now i want to undo this. so delete existing mappings again (or remove them, since there seems to be no delete option).

i have tried a few things, but i am not getting anywhere... the documentation of the XML-API (datamodeler/xmlmetadata) is insufficient in this respect and I did not find any further information.

thanks to some try&error attempts I managed to find a way to use the following function calls:


RelationalDesign.getRMDeletedMap().addDeletedMapping(thismapping);

thismapping.setDeletedID(thismapping.getID());


but they do not run without errors 😔 at least the desired effect is given: The mappings disappear from the ODM and finally a DeletedMap-XML is created. The problem: It is not saved - if I close the design and open it again, the mappings are visible again, despite XML and entries in the RMDeletedMap.

since I am obviously on the wrong track here, i'm hoping someone has already had some experience with this or can at least give me a bit of an understanding of the concept of deleted mappings?

Thanks in advance for your help 😊

Sign In or Register to comment.