Subdocument
public class Subdocument : Properties, NSCopying
Subdocument is a nested document with its own set of named properties. In JSON terms it’s a nested JSON Map object. Like Document, Subdocument is mutable, so you can make changes in-place. The difference is that a Subdocument doesn’t have its own ID. It’s not a first-class entity in the database, it’s just a nested object within the document’s JSON. It can’t be saved individually; changes are persisted when you save its document.
-
The subdocument’s owning document.
Declaration
Swift
public var document: Document?
-
Checks whether the subdocument exists in the database or not.
Declaration
Swift
public var exists: Bool
-
Initialize a new subdocument
Declaration
Swift
public convenience init()
-
Copy the current subdocument.
Declaration
Swift
public func copy(with zone: NSZone? = nil) -> Any