Maintaining custom constructors in the Dataset Model classes

The Dataset Model Generator Plugin of the Business Entity Designer (Consultingwerk.BusinessEntityDesigner.Plugins.ModelClassGeneratorPlugin) maintains constructors in the generated Dataset Model class to simplify search access. Whenever the Dataset Model classes are regenerated this process regenerates those constructors to update possible changes from the design (Generate Search Code flag of the Index).

To keep custom constructors in the Dataset Model classes from getting replaced (removed) during this process, it's required to add the 

@CustomConstructor.

annotation to those custom constructors.

Sample Constructor with Annotation

    @CustomConstructor.
    /*------------------------------------------------------------------------------
        Purpose: Constructor for the CustomerDatasetModel class
        Notes:   Retrieves data based on a named query   
        @param poNamedQuery The INamedQueryParameter that defines a named query
    ------------------------------------------------------------------------------*/
    CONSTRUCTOR PUBLIC CustomerDatasetModel (poNamedQuery AS INamedQueryParameter):
        SUPER ().
        THIS-OBJECT:RetrieveData (poNamedQuery) .
    END CONSTRUCTOR.