Persistable Datatype
An persistable datatype feature has been introduced to the Datatype Editor. Leveraging this functionality, process-related data can now be stored in an external collection using the entity datatype defined via the DB Entity Box. This enhancement enables the execution of database operations such as insert, update, delete, and select through the DB Entity Box.
When the persistence switch is enabled on a datatype, the entity becomes active for use in database operations.
The _id attribute is automatically generated and cannot be modified. It is the unique field used in DB operations.
Under the Entity tab, insert, delete, and update queries are automatically generated. A collection name is created for the corresponding DB operations. To create a select query, the Add New button can be used. The multiple result switch can be used for single or multiple record selection.
The datatype model created from the node and the relevant DB operation are selected.
The insert query takes an object as input and returns the inserted _id as output.
The delete query takes the unique _id as input. It has no output. The node executes and performs the delete operation.
The update query takes the entire object to be updated as input. The object must contain the _id. It has no output. The node executes and performs the update operation.
If no input is defined while creating the select query, there is no input at runtime. It returns the result of the select query (a single or multiple result based on the multiple result parameter).