1096
Views
11
Comments
Solved
Entities Name in backend databases

I know that the entities name remain same in the front end in different environments? However, would like to confirm whether do the entities have same name in the different environments in backend databases too? Or the names get changed for each environment?

Also,  if don't have access of the backend databases, how can I know the entities name in the different environments to update/delete any data into/from any particular entity?

2018-10-29 08-31-03
João Marques
 
MVP
Solution

Hi Sachin,


The tables physical table name is not necessarily the same in the different environments. The name of the table in the database assumes the following naming OSUSR_<3 characters representative of the module>_<table name> (e.g. OSUSR_1XO_Customer).

When you move a table to a different module, the table name does not change (so the data is also not moved), just the metadata but when you deploy that table to another environment it will take the 3 characters of the new Espace (e.g. OSUSR_FT2_Cusomter). That's an example of a common situation causing a different name.

Using Outsystems, you don't need to be aware of the physical table name as OutSystems querying data abstracts you from that.

You use the metadata model ({Entity}.[Attribute] is the way to use the table and its fields) to refer to a table instead of the physical table name and the conversion to the physical table name to run in the DB is taken care of by the platform.


Hope it helps.

Cheers,

João

2020-09-21 11-35-56
Sachin Waghmare

So, if I send query to our DBA to execute on the SQL Server database with metadata model ({Entity}.[Attribute]  will to allow them to modify the data into that particular entity or do i need to send query using the physical table name OSUSR_FT2_Customer? Please suggest. 

2018-10-29 08-31-03
João Marques
 
MVP

If he runs in the SQL Server database, he needs the physical table name (so OSUSR_FT2_Customer, for example).

You can translate the query in OutSystems Logical way to SQL Physical way, very very easily using the component SQLMap.


Cheers,

João

2025-04-22 05-54-18
Shashi Kant Shukla

Hi Sachin,


If you want to update/delete any data into/from any particular entity you wont be required physical table name you can simply do it by either entity action or advance sql using entity name.

Physical table can be differ in different environments if you have database access then you can check in ossys_entity table.

One more scenario if you are having more than one environments with different physical_table_Name and you are using store procedure then I can understand you should not change the table name in store procedure for different environments in this case you create synonyms for related tables in all environments to use same store procedure.


Regards

Shashikant Shukla



2020-09-21 11-35-56
Sachin Waghmare

Hi ShashiKant,

I don't have access of production environment. So, not sure how i can find the physical table name created behind the scene for any particular entity.

Thanks,

Sachin

2020-11-10 23-58-16
Raphael Ranieri
 
MVP

Sachin,
Another good source of information explaining the changes in the table names and versioning is this post and this article take a look!


OutSystems change the names of the tables when you delete it in Service Studio for example, so you may have more than one table with same name but with different 3 characters Suffix. It is very well explained in the article above.


About the exact point you want to know the article says this:


"The XYZ code is unique per eSpace. Each eSpace has a preferred XYZ code to use. If I have an eSpace named “CustomerPortal” and and in my Development environment its tables get the XYZ code of “6D5” and then I deploy CustomerPortal to my QA environment, the XYZ code in QA should also be “6D5”. However, this is not a guarantee. One exception is if there is another eSpace using the same XYZ code, in which case a new one will be used. This will often happen if you deploy an eSpace to an environment, delete that eSpace, then deploy it again to the environment. Another exception is that renaming an eSpace will change its preferred XYZ code for new Entities."


Cheers and Regards,

RR :)

2021-01-04 08-13-48
Toto
 
MVP

Hi,

You can check the Physical table name via Entity "Entity" on System on Manage Dependency


2020-09-21 11-35-56
Sachin Waghmare

Hello,

I am not able to find the mentioned entity. Do, we need to do any settings into the service center to get that entity available on service studio?

Thanks,

Sachin

2019-07-26 07-21-47
Abdul quadir Saifee

you need to add dependency for "system" and select entity. its always there. 

2020-11-20 07-43-04
Unnati Khanorkar

Hi Sachin,

As a quick solution you can try using the SQL with a simple select statement in your screen action and execute it. This will give you the exact generated SQL statement with actual table name.


Let me know if this helps.

2020-09-21 11-35-56
Sachin Waghmare

Hello Unnati,

If I don't know the physical table name, how I can run the select statement?

Thanks,

Sachin

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.