2016-08-25 18-41-23
Lúcio Ferrão
Moving an entity to another espace without loosing their data
4729
Views
49
Comments
On our RadarOn our Radar
Backend
when refactoring entities between espaces, manual database scripts are required to migrate data to the new physical entity
Hi,

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
2016-04-21 20-09-55
J.
 
MVP

similar to https://www.outsystems.com/ideas/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
2011-06-15 10-51-22
Joop Stringer
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

Hi,

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?

2016-04-21 20-09-55
J.
 
MVP

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

+1

+1

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,

PC

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.

2022-11-17 11-29-37
Carlos Lessa
Champion

+1 good idea!!!

This feature would be very useful when it is necessary to refactoring old applications that didn't follow best practices in terms of architecture. At the moment, the process of migrating tables between eSpaces is a very time-consuming. 


C'mon guys, we need this!! :)

Hey guys! 

2021 reminder that we need the platform to help us with the refactoring process. Each time I have to use the forge component my life expectancy drops by at least 6 months.

As others have mentioned, this was initially flagged well over a decade ago. Anyone know how long it's been marked as being on their radar?

Merged this idea with 'Move an entity to another Module without losing its data' (created on 29 Mar 2021 20:52:01 by Raphael Ranieri)

We are often faced with scenarios in which we need to refactor applications.


Sometimes we are able to move some elements to a new module by renaming the old module to keep the entities with their data, since if we create an entity (Even with the same name), in another module, we lose all its data, because to the system it's a new entity


There are currently some components in Forge like Refactor that allow us to change the location of the entity while maintaining the data.


However, it would be very interesting to have this native functionality in Service Studio, so that it would be something simple, like right-clicking on the entity and choosing something like changing Module.


That way, refactoring and maintaining a consistent architecture would become much easier in some scenarios.



This comment was:
- originally posted on idea 'Move an entity to another Module without losing its data' (created on 29 Mar 2021 by Raphael Ranieri)
- merged to idea 'Moving an entity to another espace without loosing their data' on 29 Mar 2021 21:17:08 by Justin James
Merged this idea with 'Migrating espaces together with their data' (created on 12 Jul 2010 10:14:53 by Hans Bruins)
On the moment I am busy to migrate espaces from a 4.2 server to a 5.0 server environment.
The espaces themselve are no problem: they are easily migrated.

However, the espaces are running in a production environment so I want not only the espaces but also the data in their tables.

The workaroud for mee on the moment is to have a native SOL server client-to-client connection but it would be handy if you just  could create a kind of solution that packs it all: espaces and data.

This comment was:
- originally posted on idea 'Migrating espaces together with their data' (created on 12 Jul 2010 by Hans Bruins)
- merged to idea 'Moving an entity to another espace without loosing their data' on 30 Mar 2021 13:56:11 by João Heleno

This is an extremely necessary tool/functionality. 

Even having the forge component in order to refactor an aplication, that component is not 100% complete because it does not comtemplate static entities data. 

I recently had to procede to an aplication refactor due to circular references, wich included some static entities. And with that forge component limitation, i was forced to manually migrate the data from the "old" to the "new" tables in all environments in order to maintain data integrity.

This procedure was a big time consumer, and so, if OutSystems provided a mechanism to simply move the entities and its data to the new module it would be a huge huge help in order to simplify the refactor process.

Merged this idea with 'Move tables between modules' (created on 28 Apr 2021 06:09:25 by CrisSanz)

Improving the refactoring process in this sense is too manual a task:

  • Copy and paste the table
  • Use refactor or generate scripts for data loading
  • Go to all consumers and one by one change the table

Our factory is getting bigger and it costs us a lot to refactor it, almost exclusively because of this and we do not see the sense of such a complex process, just to move tables between modules




This comment was:
- originally posted on idea 'Move tables between modules' (created on 28 Apr 2021 by CrisSanz)
- merged to idea 'Moving an entity to another espace without loosing their data' on 29 Apr 2021 15:44:04 by Justin James
Merged this idea with 'Move Entity to Another Module' (created on 29 Jun 2021 09:34:48 by Budi Santoso)

There should be a feature to move an entity to another module within the same application.


I have a module (lets call it ABC module) started simple and has an entity that extend User entity with additional info (lets call it UserInfo entity).

As time goes by, this entity is now leverage by more and more modules and any enhancement on ABC module will gives dependencies warning to all the modules that leverage UserInfo entity.


With the above feature implemented, people can split out their entities and adapt it accordingly.



This comment was:
- originally posted on idea 'Move Entity to Another Module' (created on 29 Jun 2021 by Budi Santoso)
- merged to idea 'Moving an entity to another espace without loosing their data' on 01 Jul 2021 03:49:20 by Justin James

Hi Budi,

there is a Forge component with that ability:

https://www.outsystems.com/forge/component-overview/496/refactor



This comment was:
- originally posted on idea 'Move Entity to Another Module' (created on 29 Jun 2021 by Budi Santoso)
- merged to idea 'Moving an entity to another espace without loosing their data' on 01 Jul 2021 03:49:20 by Justin James
2024-01-12 11-11-18
Alfaro
 
MVP
Merged this idea with 'Move entities from one module to another without losing data' (created on 17 Aug 2022 08:44:10 by Ricardo Pereira)

Hi,

For refactoring purposes, many times we need to move entities form one module to another, trying to modulate the architecture. The main problem is, that, at this moment, we don't have a simple and fast way to do it, like cut from one module and paste it in another (in the case that we already have data).

I think (based in that the "Entity" is an abstraction of the DB table, that persist in the DB), that Service Studio could give us that possibility. At least if the modules are from the same catalogue. It can be a great improvement for refactoring purposes.


Best regards,

Ricardo Pereira

Hi Ricardo,

Did you use the Refactor component to move entities?

https://www.outsystems.com/forge/component-overview/496/refactor

Regards,

Daniel

Hi Daniel,

Yes, I used it once, and I believe that the proposal that I made is much more easier and fast to do the job. And, I believe that many of us don't do the needed actions many times because of that, doesn't having a fine and easy solution. I believe that, as a low code platform, with accelerators for everything (or almost everything), this could be a great update.


Best regards,

Ricardo Pereira

I 100% agree with Ricardo. Must be an easier way to make it. The Refactor component is a solution but not the most practical. 


Regards

100% agree with Ricardo. We passed this problem lots of Times. If we have a solution on service studio, it Will be fantastic.

BR

Another fantastic useful idea, I agree, it would be much easier than the Refactor component 

OutSystems AI Mentor tells us to fix Monolithic Modules and there is no actual way to do this if the module in question is a Core Service Module with mixed business concept. For an app already in Production needing to do a data migration because OutSystems is unable to move/rename entities without creating a new table is very frustrating, only the OutSystems metadata needs to be changed the physical tables in the database shouldn't need to change in any way. To note this idea is 13 years old and no action was taken on this.

obviously nowadays there are workarounds to avoid losing data with refactories, but it makes the work much bigger and less precise.

This feature would be great.

554
Like