Show/Hide Toolbars

TMS Aurelius Documentation

TAureliusDataset is installed in Delphi component palette and can be used at design-time and as any TDataset component you can set its fields using fields editor, specify master-detail relationships by setting DatasetField property to a dataset field, create lookup fields, among other common TDataset tasks.

 

However, creating fields manually might be a boring task, especially if you have a class with many properties and need to create many fields manually. So TAureliusDataset provides a design-time menu option named "Load Field Definitions..." (right-click on the component), which allows you to load a class from a package and create the field definitions from that class.

 

DatasetDesignTimeMenuOption

 

A dialog appears allowing you to choose a class to import the definitions from. Note that the classes are retrieving from available packages. By default, classes from packages installed in the IDE are retrieved. If you want to use a package that is not installed, you can add it to the packages list. So, for a better design-time experience with TAureliusDataset, create a package with all your entity classes, compile it, and load it in this dialog.

 

DatasetDesignTimeImportFields

 

The packages in the list are saved in the registry so you can reuse it whenever you need. To remove the classes of a specified package from the combo box, just uncheck the package. The package will not keep loaded: when the dialog closes, the package is unloaded from memory.

 

Note that the dialog will create fill the FieldDefs property, not create field components in the fields editor. The FieldDefs behaves as if the field definitions are being retrieved from a database. You would still need to create the field components, but now you can use the FieldDefs to help you, so you can use "Add All Fields" or "Add Field..." options from the fields editor popup menu. The FieldDefs property is persisted in the form so you don't need to reload the package in case you close the form and open it again. That's its only purpose, and they are not used at runtime.