major
nice-to-have
minor
Although the configuration for singletons can be created (in a rudimentary way), the actual object is not created in the process.
To define in-app tree structures, it is convenient to include a root singleton in the structure so that it can be used as the business object for the tree node. The constant null is unsuitable as a business object for tree nodes. Although a string "root" works, it results in ugly case distinctions.
Code Migration
Model Configuration
- A module no longer has a ` factory ` property. Instead, the setting must be configured using a ` factory` annotation:
!ModelService Settings
- The "factory " and "main-properties" properties are no longer explicitly available in a module’s advanced settings. Instead, any annotations for a module can be set in the module settings within `tl:ModelService`:
The ` main-properties ` must be set as an annotation of the respective type:
Model Configuration
- A singleton must not have any mandatory attributes without a default value. In particular, this now also applies to the quasi-implicit `name` attribute. Since the `StructuredElement ` table has a mandatory `Name` column, all singletons stored in this table must declare a `name` attribute with a default value:
The <section name="StructureRootNodeNames"> section from the application configuration has been removed. Instead, the corresponding value for the root element’s name must be specified in the default value for the name attribute.
This is irrelevant for existing data sets, since the root elements were already created according to the old schema. Therefore, no data migration is required.
Generated Model Classes
- The factories for modules are no longer configured classes. Instead, they may now only have a public default constructor. Either the existing constructor can be removed without replacement, or the factory can be regenerated.
- The root lookup methods in ` StructuredElementFactory ` no longer require the module name as an argument. This applies in particular to the generated factories as well.
FastList Attachment
- The feature that allowed `TLEnumeration`s (aka `FastList`s) to be attached to objects has been removed. `TLEnumeration`s can be declared locally within modules. Anything else required must be defined by the application itself.
Data Migration
Roles are no longer defined within the scope of singletons but within the scope of modules. The corresponding associations must be reassigned. This is handled automatically by /com.top_logic.element/webapp/WEB-INF/kbase/migration/tl-element/Ticket_25533_Move_Roles_from_Singletons_to_Modules.migration.xml.
Test
- com.top_logic.demo/src/test/com/top_logic/demo/scripted/model/TestInAppSingleton.script.xml