I came across an odd issue I'm hoping someone else has seen...
I have the contact entity in my solution and it's renamed to "Client". Recently I realized that in deployment, it is not renamed. After a bit of digging it's because in the solution XML it looks like this - the "behaviour" is equal to 2 which as far as I can tell, is the same as NOT selecting "Include Metadata" when adding an entity:
<RootComponent type="1" schemaName="contact" behavior="2" />
Assuming it's because someone had accidentally unchecked the metadata option during create, I removed and re-added the entity, definitely leaving metadata checked (and only adding select sub-components), however when exporting again the value in the solution.xml is still 2. I then repeated the process but this time didn't add any sub-components when adding the entity (with metadata). Exporting that solution showed that behavior stayed at "1" in the XML.
I then went and gradually added each type of sub-component to contact and exported in between. To cut a long story short, as soon as I add relationships, the behavior value changes to "2" on export. After adding fields it was still 1 and same after adding forms and views in turn. I can't figure out why that would be the case. Anyone?