1
 Follower
4
 Likes

Any way to update a static entity records values

Backend
On our radar

We have a request that origins a new attirbute in one of ours static entity and update your value.

The static entity have a lot of records and manual change take an expensive time.

Created on 22 Jan
Comments (6)

If you are trying to update a static entity then it shouldn't be a static entity but a normal Entity. 

Static entities are meant to be static and not suffer changes by user inputs.

Or am I understand your idea incorrectly?


Abílio Matos

Abilio, you are correct. Static entities are like the code you write. A user cannot change it in any way.

But I understand Maycon's requirement. Imagine that you create all your static records with the Is_Active=True, but you must allow users to disable records at runtime (setting Is_Active=False). This is currently possible if you isolate the dynamic attributes in a regular entity, and use a 1-to-1 relationship with the static entity.

For example, if you have a static entity Country and you want some countries to be disabled at runtime, then create a static entity Country only with the name, and another non-static entity CountryDynamicState with an Id of type Country Identifier, and the Is_Active attribute with default value True.

You can then create a screen that displays the left join of both tables to the user, and allows the user to change the Is_Active field.

Abilio, the entity (infos) will not be updated normally ("seasonlly") but can be by any law and this operation occurs by our actions.

At this moment and our case, have to add an attribute to record's classify. And the work needs to be maked manually.

Leonardo, thanks for interact.

Hi Maycon,

Still, static entities are static, they are like constants. They should not be updated regularly, if you need that, Leonardo's solution is the best one: have the static entities to use programmatically in your code, and all dynamic stuff in a normal table that extends the entities.

Hi Kilian,


I understand the "objective" for static entity.

But for us exists events that impact in this data (e.g.: Brazil laws) and when its change we've to update some infos in static with a lot of records.

Tnx ALL!

Note: I mean about update by maintenance, not by user action!

views
239
Followers
1