Loading TOC...

es.addAttachments

es.addAttachments(
   instance as Object,
   attachments as String
) as Object

Summary

This function is deprecated and will be removed in a future release.
A utility function used by generated code to add one or more nodes to an instance as attachments.

Parameters
instance An object containing the instance to which this function should add attachments.
attachments The attachments to add to the instance. These should be XML element nodes or JSON object nodes.

Usage Notes

The input instance should be an instance node of the form produced by es.initInstance. You will not usually call this function outside of code generated by Entity Services. The generated code uses this function to add the original raw source to an instance as an attachment.

See Also

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.