Moving an entity to another espace without loosing their data

On our radar
when refactoring entities between espaces, manual database scripts are required to migrate data to the new physical entity
Created on 10 May 2010
Comments (26)

Moving one entity from one eSpace to another one and  keep table name and table data is an important feature to have in Outsystems.

We had this issue when we started doing eSpace refactory and need to have entities associated with another eSpaces without changing physical table name.

For example in eSpace X we have CLIENT and POLICY entities and we created two eSpaces with these themes (clients and policies). In Policy eSpace we need POLICY entity and in Client eSpace we need CLIENT entity...

Best Regards,
Nuno Fernandes

Merged from 'Move Entity to another eSpace' (idea created on 14 May (3 days ago) by Nuno Fernandes), on 11:06 (just now) by Pedro Oliveira

similar to https://www.outsystems.com/wisdomofthecrowds/IdeaComment_List.aspx?IdeaId=72

Merged from 'Move Entity to another eSpace' (idea created on 14 May (3 days ago) by Nuno Fernandes), on 11:06 (just now) by Pedro Oliveira
I got a message that this is possible to do by going into the database and switch eSpace ID's in the meta model.

Only have to figure out how it actually can be done :-)
We've managed to this by copying the table in Service Studio to the desired eSpace, publishing that, then going to the database, delete the new table and rename the old table to the new one. But yeah, it'd be vastly superior to be able to do it from Service Studio.

Refactoring tooling.....!!!!!

This continues to be really relevant!

It absolutely does.

Great idea, especially when you want to split out functionality and use it as a shared component.

Yes, this feature is useful especially refactoring the code


There is ANY reason (besides other priorities) to this to not have being implemented as part of the platform yet?
Move entities from one module to other is absolute essential when doing refactoring, and it poses lots of problems...

Anything other than change metadata information is required in order to do this?

Agreed. The refactor forge component is a waste to use. Its not helping really because you need to do roughly the same amount of work.

Refactoring means better quality for the developers and customers because you can create more seperate apps...

Sounds like we're all on the same page. I know the ability to drag and drop an entity exists, but no data transfers. That's the real need: move an entity with data from one module or eSpace to another. Is it possible to do that from the SQL backend?

We really need this...

I just wanted to submit this as a new idea. I don't understand why this is still not in the product after more than 8 years. I believe that when your are building large landscapes, proper support for refactoring is essential.

Agreed!!  Same issue when moving Roles from one module to another - the original role Id's are replaced by new ones and users no longer have the effective roles they should.  HUGE PROBLEM.

++ For native re-factoring support for entities AND roles!  Need this yesterday OutSystems!

Merged this idea with 'Have the option to include data when copying an entity between modules' (created on 02 May 2019 14:00:10 by Sienna)

Currently if you copy an entity from one module and paste it into another, none of the data is transferred.  It would be VERY helpful to have the option to include copying across the data for that entity as well.

This comment was:
- originally posted on idea 'Have the option to include data when copying an entity between modules' (created on 02 May 2019 by Sienna)
- merged to idea 'Moving an entity to another espace without loosing their data' on 27 May 2019 10:42:12 by Carina Fonseca

When you change module of the entity, their reference tables will also gets recreated. This is huge data loss. We were new in the outsystems and now we have to refactor our code to avoid circular dependency and improve product support. But we cannot compromise with data. it will be very helpful, If there is any workaround for now. 

Hi Mayur,

When refacturing, the trick is to keep the current eSpace as data eSpace, and move everything non-data-related to other eSpaces. Of course, if you have created circular references between Entities in different eSpaces, this is not a solution. There's also the Refactor Forge component that may be a solution.

Mayur, I believe there is a data extractor on the Forge that you might be able to use to extract the entities into excel files or similar and then you can bootstrap them into your new module.

HTH, Sienna



Since this is an idea with almost 10 years, created by one of the company's founders, I'd say it would be a nice thing to do ;) 

Best regards,


Hi !

It is very important that Outsystems provide official solutions to support the architectural evolution of applications. With a solution to this need, we will be faster in evolution.

Best Regards,

Alberto Granja

Outsystems has introduced Service Actions, Architecture Dashboard and other tools to support healthy applications that can scale with the power of low code. Entities also need the same love otherwise developers/architects are still missing the support to scale/maintain growing applications

Guys... this was created 10 years ago, cmon.. let's do this.