How does using a record from a static work behind the scenes?

When i do for example Entities.Country.USA = Variable.Country

Does the platform go to the database or are the identifiers stored server side or something like that and has no need to go to the database?

Hi Tony Carreira,

Static Entities are a special type of Entity that creates a predefined list of values that can be used in our applications.

Defined during design and development 

Cannot be changed at runtime 

Only 1 Entity Action 

The Get Entity Action

Stored in the database.

More information at: Static Entities , Statc Entities - Documentation

More information about enumerate: Create and Use an Enumerate

I hope it helped you

Best Regards,

Hi, @Tony Carreira 

It is actually a good question. I would imagine that the IDs are kept in the code as something like an Enumerated Type, so when you actually use Entities.Country.USA in your code you don't go to the database. Thinking of it, even if you go to the database to fetch some record, you need to have a way in your code to identify that specific record you want... something like an Enumerated Type! So, my guess is that you don't go to the database.

Curious about this one. Maybe someone from OutSystems will reply.

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