# Inheritance situation in BmmSchema and PBmmSchema **Category:** [BMM/Expressions](https://discourse.openehr.org/c/bmm-el/60) **Created:** 2020-08-03 07:42 UTC **Views:** 575 **Replies:** 6 **URL:** https://discourse.openehr.org/t/inheritance-situation-in-bmmschema-and-pbmmschema/906 --- ## Post #1 by @Bert_Verhees PBmmSchema inherits from PBmmPackageContainer and BmmSchema BmmSchema inherits from PBmmPackageContainer and BmmModelMetaData This double, because BmmSchema already inherits from PBmmPackageContainer and PBmmSchema inherits from BmmSchema, it is an double that PBmmSchema also inherits PBmmPackageContainer I think this is an error because it does not add any logical functionality but it causes confusion. Best regards Bert Verhees --- ## Post #2 by @thomas.beale You are right - this extra inheritance is an error. I have removed it, and improved some of the documentation in Section 3 of the BMM spec, which did not match the classes. Hopefully it now does. There are some other changes as well - see the Amendment history. I think this should make life easier for your development. These changes have been uploaded. --- ## Post #3 by @Bert_Verhees Hi Thomas I think Primitive_types and class_definitions in P_BMM_Schema should be removed because they already exist in BMM_SCHEMA Bert --- ## Post #4 by @thomas.beale That is indeed another annoying error. I think these are old refactoring errors in the UML where certain relationships were copied and not moved, and as they do not appear on the diagram, I had not realised they are in the class definitions. So the correct definitions are as follows: * `BMM_SCHEMA` has no class_definitions or primitive_definitions * `P_BMM_SCHEMA` and `BMM_MODEL` both define properties of these names, in their respective ways. * `P_BMM_SCHEMA` does not define `includes`, it's just inherited from `BMM_SCHEMA`. These fixes are now up. Sorry for the inconvenience - it seems there are more hidden gremlins in the UML than I had realised. Still, we're fixing this model, with your help! --- ## Post #5 by @Bert_Verhees I am glad to help, I have the advantage that the compiler finds the errors, to find them manually is very hard. :wink: --- ## Post #6 by @thomas.beale I also have the whole model in Eiffel, and now mostly in Java (Archie), but still I did not see these errors because UML is not good for doing full validation. Also some model elements are not shown on diagrams even when they exist. At the end, the UML is a 'best attempt' to represent a validated formal model in pictures that everyone likes to read. --- ## Post #7 by @Bert_Verhees Maybe it is because I am really building the thing, as a hobby project, so I take my time and have a quiet mind when working on it. No stress troubles my thinking. Even if I never finish it, it does not matter to me. It is the road, not the goal that keeps me going. :man_artist: And another thing, I work in a Spring, MongoDB, Lombok environment, which allows to work very model oriented. --- **Canonical:** https://discourse.openehr.org/t/inheritance-situation-in-bmmschema-and-pbmmschema/906 **Original content:** https://discourse.openehr.org/t/inheritance-situation-in-bmmschema-and-pbmmschema/906