942
Views
5
Comments
Solved
Different between static entity and entity
Question

Hi, 

What's the different between static entity and entity? why and when should i use static entity?

Thanks

2020-03-24 00-01-07
Nuno Gonçalo Pereira
Solution

Hi Ervin Toepak!

You should use static entities when your data will to be immutable over time, such as the example of statuses: "In Progress", "Finished","Canceled". They don't need to be changed, they are fixed.

By other way, Entities can be changed any time when you need to update them.

Best Regards,

Nuno Pereira

2019-05-22 11-30-09
Marcelo Ferreira

Hi Ervin,

Check this document. 

Regards,

Marcelo

2019-09-24 18-41-25
Jorge Martins
 
MVP

Hi Ervin,

When you follow the online training, one of the first lessons explains what Entities and Static Entities are. They only make sense server-side, hence the links to the web applications training.

Entities and Static Entities are both persisted using a database table. The main difference has to do with usage:

  • Entities allow developers/users to create, retrieve, update and delete records to the database table at runtime;
  • Static Entities have their records (the data) defined at design time by the developer, and can only be retrieved at runtime. They are often used the same way you would use database lookup tables.
UserImage.jpg
Ervin Toepak

Hi jorge,

what do you mean by this "They only make sense server-side"? What about in mobile app?

thanks

2019-09-24 18-41-25
Jorge Martins
 
MVP

Ervin,

On Mobile Apps you don't have Static Entities. You can only define them on the Database, not on LocalStorage. You can still synchronise a Database Static Entity to an equivalent LocalStorage Entity but it won't be read-only at run-time (or you wouldn't be able to synchronise to begin with).

2020-03-24 00-01-07
Nuno Gonçalo Pereira
Solution

Hi Ervin Toepak!

You should use static entities when your data will to be immutable over time, such as the example of statuses: "In Progress", "Finished","Canceled". They don't need to be changed, they are fixed.

By other way, Entities can be changed any time when you need to update them.

Best Regards,

Nuno Pereira

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