hi guys! What is the difference between inherits a...
# getting-started
b
hi guys! What is the difference between inherits and contains in glossary ?
m
inherits models the
isA
relationship while contains models the
hasA
relationship
thank you 1
e.g. Email
isA
Sensitive field... so Email will inherit the Sensitive term.. while Account
hasA
Balance ... so Account will contain the Balance term.
thank you 1
if you think in terms of OO .. isA is like inheritance (extend a BaseClass / implement an Interface) while hasA is like composition (having a member variable of that type)
thank you 1
b
@mammoth-bear-12532 Thank you!!
b
it would be nice to have a "similar to" relationship as well.
thanks ewe 1