I believe the only automated option would be using the customization script and adding those methods through it. If it's lot a code it can become cumbersome indeed. Or let the customization script add {$I} directives to include files and then you add code in those files. Or you use the customization script to add some macros and then you do some post processing in the file and replace those macros.
Unfortunately Delphi doesn't have a concept like partial classes from C# so it's hard to extend classes from another unit.
Class helpers are a possibility, yes, if all you need are methods and you do not need to add fields in the class, then it might work for you.
What if we create an "extended" class in which we "inject" the entity in a separate unit to prevent overwriting by the Data Modeler (e.g. TEntity_Extended.Create(TEntity) and then use a custom ObjectFactory to spawn TEntity_Extended objects instead of TEntity objects?
Could this be a feasible solution? If so, I'll give it a try with a small test app.
Hi Mark, I don't thinks that's a good solution since TEntity_Extended will have to have all properties of TEntity, and include all attribute mappings. You can't delegate mapping of Aurelius entities to other classes or subclasses.