if the extended data is used in the main process of your app; use a 1-1 association to account. This allows you to bind this data to their ability to login. don't use inheritance for this. This is further explained in this module https://gettingstarted.mendixcloud.com/link/module/37/lecture/338
Additionally take a look at this learning path. it will help your to build better domain models:
You could use the user entity as generalization for your entities, then your internal and external users will enherit the attributes from the user entity.
For more information on inheritance this blog post is a nice starting point:
Thanks for the great feedback. Yes this did create a little confusion on my end as the recommendations are conflicting lol.
I was in the midst of watching the entire learning path on advanced data modeling so I decided best to finish that up first which I did yesterday. Here is what I think I am going to do, happy to hear feedback on this.
If I understand it right I dont want an association with the account because I am not using majority of the attributes. And it "is not an account" but an Internal Person "has an account"
By associating with person I can keep all of that data consistent and use it in my pages easily to see the "persons" that are both internal and not based on the specialization.
All of my "contacts" just remain in the peson entity as they are non-specialized.
Hopefully that makes sense, if not def let me know!!!!
Thanks all and Happy New Years!
Based on your further input, I would go for the following domain model:
Since a InternalPerson is equal to a Person, but has more details. And a Person is not equal to an InternalPerson. Inheritance works. With this, you can Manage both Person and Internal as a Person, but the InternalPerson is specialized and can thus handled accordingly.
The 1-1 association results in the possibility that one has a account. Both Person as InternalPerson can have an account. You can define in your own setup who will and who won't get an account.
If a Person will never have an account, than you could move the association to account to the InternalPerson. In that case only InternalPerson can have an account and Persons won't
Happy modeling new year!
Two bigtime contributors giving you two conflicting advises. How to pick the right one if you are only getting started with Mendix. Oh my...
Here is my two cents:
For the question 'use inheritance or a 1-1 relation?': That boils down to is-a or has-a.
Also see https://gettingstarted.mendixcloud.com/link/module/50/lecture/399
Btw. If you refer to something as 'External user' then name the entity the same: 'ExternalUser'. That keeps it self-explanatory.