DocumentType accountsType = DocumentType.createDocumentType("Accounts",firstAccount);
accountsType.setReference("owner",ElementType.TYPE_BACK_REFERENCE,"Customers","TODO");
// Accounts indices
accountsType.addIndex("owner",true);
accountsType.addIndex("number",true);
connection.saveDocumentType(accountsType);
}
/** Deletes Customers and Accounts schema (by deleting
* ^Schema(Customers), ^Schema(Accounts), ^Index(Customers)