Hi guys,

I have the following question, is it possible to "move" one entity from "module A" to "module B" without losing data?
What is the best way to do this?

I am in a project and we want to move some entities to another modules to make it more clear to understand the architecture.


Best regards,


Eduardo Oliveira


Hi Eduardo,

There is a forge component refactor for moving entities without losing any data. You may try this.

Regards,

Swatantra

There's no out-of-the-box method to do this - moving entities is conceptualised as creating new ones in Outsystems.

Just a heads up that the Refactor component is for OS 10. If you need to do this in 11, you'll either have to move data through database scripting (if you have direct access to your database), or creating a Timer and moving the data yourself from the old Entities to the new ones.

Solution

@Afonso: I don't think the Refactor component break in version 11, there's just not a 11 version released yet.

@Eduardo: think twice whether you want to move the Entities. Sometimes it's better to move e.g. all logic and Screens to another Module, then the Entities. The only exception are Static Entities that do not have autonumber Ids. Also, scripting can be a pain, especially if you have foreign keys.

Solution

@Afonso: I tested the Refactor, works well, but when we talk about Static Entities I got some problems about entities that weren't autonumber.

@Kilian: I will study to find the best way to do it, but I got the problems that you mentioned.