Entity hide attribute when consumed
337
Views
2
Comments
New
Database

I want to have Entities that hide attributes when consumed

This way, it will not be necessary to create Structures to do it.

For instance,

If I have an Entity:

When consumed under Expose Read Only, what we see is:

What I'm proposing is to be possible to hide some fields, so if we want to hide some attributes, such as auditing or others, we would have:

By setting attributes as not Public

Therefore, all attributes that were not public, when changing the Entity, would either remain with the original value or would be changed in the environment that exposes the entity.

In this way, I see gains, in terms of Consistency and Maintenance, over Structures.

I agree with the overall idea however I think actually hiding the attributes (meaning, changing an attribute called Public) can become a burden when navigating other people's code as it could lead to false assumptions regarding what is or isn't actually there.

A simple alternative would be to have a field with a similar practical effect, but renamed to something like "Access Level" where you could choose from Module-Only, Application-Only or All/Any.

Afterwards, whenever a module without the correct access level pulls the dependency, it would see all the fields present in the Entity, but only the accessible ones would be available to actually use. Everything else could be grayed out and impossible to select/reference.

Thank you for sharing your thoughts. I understand what you are saying about hidden attributes potentially causing confusion in code navigation. Your suggestion of using an "Access Level" field seems like a practical and clear alternative.