Database problems - associated/child entity creating an empty line for the parent enity

I want to create an app where I can add buildings within them there will be rooms. Associated with rooms there will also be tasks assigned to users that are meant for a specific room and building. The domain model is shown below. Is the generalization in rooms the right way to go about this to inherrate data from buildings? I am able to easily create new buildings. The problem I am facing is that every time I create a new room in a building an empty new building is created. This instead of the room being associated with a specific building. Within new rooms page I am using a reference selector of all buildings to choose which building should be associated with the room I am creating.  And lastly within tasks these empty buildings are then shown in my reference selector instead of the buildings I have myself created. This will likely be taken care of when the above-mentioned issue is solved
2 answers

In your domain model, you put your room as a generalization of a building, this is why you have that behaviour, you just have to remove the generalization


Things I do not get to work unless I have a generalization:

- reference selector (no possibility to add building in tasks)

-validation rules (I want total number_of_floors to be greater of equal to the floor_number and same for rooms)

I feel like there is still something that I do not understand about how data is inherited. There is often a situation where I want to use an attribute from an associated entity but am not able to.