     override open func encode(to encoder: Encoder) throws {
 		try super.encode(to:encoder)
 		var container = encoder.container(keyedBy: DocumentMetadataCodingKeys.self)
+		try container.encode(self.version,forKey:.version)
 		try container.encode(self.spaceUID,forKey:.spaceUID)
 		try container.encode(self.persistentUID,forKey:.persistentUID)
 		try container.encode(self.currentUserUID,forKey:.currentUserUID)

    }


	//The data space UID can be shared between multiple Docuemnt.
	@objc dynamic open var spaceUID:String = Bartleby.createUID()

	//Defines the document UID.

    /// - throws: throws an Exception when the key is not exposed
    override  open func setExposedValue(_ value:Any?, forKey key: String) throws {
        switch key {
            case "version":
                if let casted=value as? Int{
                    self.version=casted
                }
            case "spaceUID":
                if let casted=value as? String{
                    self.spaceUID=casted
