DynamicDto

data class DynamicDto

Represents a polymorphic object ready for database storage.

This class is a public API and "transport container" that unambiguously wraps any object marked with the DynamicallyMappable annotation into a structure understandable by the framework and PostgreSQL database. Corresponds to the dynamic_dto type in the database.

Serves as an explicit, controlled way to prepare polymorphic data for writing, providing an alternative to the framework's fully automatic conversion mechanism.

Write and Read Asymmetry:

  • On write: You use this class (or its from() factory) to "pack" your domain object.

  • On read: The framework automatically "unpacks" data and returns directly the domain object (e.g., DynamicProfile), not a DynamicDto instance.

See also

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val dataPayload: JsonElement

Object serialized to JsonElement form.

Link copied to clipboard

Key identifying the object type, retrieved from the DynamicallyMappable annotation.