Handling Large and Nested Object Graphs
Posted: Tue Sep 02, 2025 11:00 am
Serializers should be registered with the engine before it is activated. This is because the aggregate serializer is passed to databases when databases are activated. Failing to register the serializer at the appropriate time would cause the database to lose a reference to the serializer.
The following command is all that is needed to register your custom serializer before activating the engine:
Defining your Own Logger
Sterling supports any type of logger you would like to use. Instead of requiring an interface or a type, which might not be practical when dealing with third-party loggers, Sterling will allow you to simply register a delegate telegram number database that invokes the logger. When Sterling produces a log message, it will call the delegate you provide with the severity of the message, the message text, and an exception if one exists. It is up to your delegate to filter the log level and handle the messages as needed.
Registering and Unhooking Your Logger
To help with memory management, Sterling allows you to register and the unhook any existing loggers. When you register the delegate for your logger, Sterling will return a unique GUID for that registration.
Sterling will easily parse large and complex object graphs. It is important to understand the appropriate strategy, however, when you have a hierarchical relationship between classes that are defined as tables.

Consider Class A that contains a collection of Class B. Currently, Sterling doesn't maintain an independent "link table" for foreign keys. In other words, the relationships are serialized as part of the class. Therefore, if you add 500 items to Class A and save it, each time Class A will save each of the 500 items (even though on disk Class A will just contain the foreign keys to Class B).
The correct strategy is to manipulate changes by saving the Class B files. Keep a dirty flag on Class A to note when new classes are added. As long as you only change the child instances, the parent will always load the latest when loaded from the database. To create new relationships, however, you must eventually save the parent to establish the relationship.
The following command is all that is needed to register your custom serializer before activating the engine:
Defining your Own Logger
Sterling supports any type of logger you would like to use. Instead of requiring an interface or a type, which might not be practical when dealing with third-party loggers, Sterling will allow you to simply register a delegate telegram number database that invokes the logger. When Sterling produces a log message, it will call the delegate you provide with the severity of the message, the message text, and an exception if one exists. It is up to your delegate to filter the log level and handle the messages as needed.
Registering and Unhooking Your Logger
To help with memory management, Sterling allows you to register and the unhook any existing loggers. When you register the delegate for your logger, Sterling will return a unique GUID for that registration.
Sterling will easily parse large and complex object graphs. It is important to understand the appropriate strategy, however, when you have a hierarchical relationship between classes that are defined as tables.

Consider Class A that contains a collection of Class B. Currently, Sterling doesn't maintain an independent "link table" for foreign keys. In other words, the relationships are serialized as part of the class. Therefore, if you add 500 items to Class A and save it, each time Class A will save each of the 500 items (even though on disk Class A will just contain the foreign keys to Class B).
The correct strategy is to manipulate changes by saving the Class B files. Keep a dirty flag on Class A to note when new classes are added. As long as you only change the child instances, the parent will always load the latest when loaded from the database. To create new relationships, however, you must eventually save the parent to establish the relationship.