Is there something equivalent to sub-entity attributes?

Is there something equivalent to sub-entity attributes?

  

I'm working with outsystems 10 for a web application project. I know how to use entities and their attributes. what I need to learn is how to add more information to my attributes. for example, it I have an entity called house and it has an attribute called address. I want my address to have (Street, city, state, zip, etc). Where do I place such information for my entity attribute?

Solution

Hi Jeremy,

I'd say you want to make your Address a "proper" concept of your data model (i.e. define an Address entity) and add those attributes (Street, city, state, zip, etc) to it. Then on your House entity you'd add an AddressId attribute of type Address Identifier that would be a reference to the Address entity record that holds the House's address information.

What I described above establishes a one-to-many relationship between Address and House (a House has a single Address but an Address can be shared by more than one House), if you want a one-to-one relationship (a House has a single Address and an Address refers to a single House) you can change the Address entity's Id attribute's data type to House Identifier. By doing this you will have to explicitly assign the Id of Address with the value of an existing Id of House.

Solution