This was a little overdue; my Sitecore code generation module, CompiledDomainModel, has been used in many projects and the code has matured enough to justify a 126.96.36.199 version number. A very important addition was made in this release.
This is a feature that has been requested by several people. If you have multiple projects or logic that is used in several DLL’s, then you need a way to divide the generated classes up into multiple files.
To make this possible, you should first check the “Platform Mode” checkbox on the settings item (/sitecore/system/Modules/CompiledDomainModel/Settings):
Note that the wrapper classes need to be resolved globally when using the platform mode. To make that possible, there is a dependency on the module itself. So you can’t use the “Remove dependencies” function when you want to use the platform mode.
If you generate the code now, you’ll see that a comment is generated:
As is explained, you must now make url’s to generate code that is specific to your project. In this case, you could generate code for the platform project and the specific “SomeProject” project. Using the following url’s, you can do that:
These url’s will only generate the code for the DomainObjectSets and FixedPathSets (check the documentation for an explanation about these sets) that are referenced in the url.
Of course you are not required to install CDM this way. You can still use the regular package on the Releases page.