Create New Document
-
From the Studio, a new document can be added to a database to either an existing collection or a new one
-
The new document ID can be generated as any one of the following types:
- Server-Side ID
- Semantic ID
- Identity
- GUID
- Artificial Document ID
-
An ID generated by the HiLo Algorithm cannot be generated from the Studio, only from the RavenDB Client
-
For a full description about all the different ID types see Document Identifier Generation
-
In this page:
Create New Document
-
From the Documents View click
New Document
.
-
Edit the new document
-
1 - Enter document ID - see the examples below
- Any collection name can be entered as a prefix.
- The collection name will be created if it doesn't exist yet.
- If no collection name is specified, i.e. the ID string doesn't end with ( / ) or ( | ),
then the document will be added to the @empty collection.
-
2 - Edit document content
Edit the document fields, the above document content showing is just an initial template. -
3 - Click
Save
when done
Create New Document in Current Collection
-
Open the down arrow and click
Create New Document in Current Collection
.
-
Edit the new document
-
1 - Enter document ID
- The current collection name is initially suggested.
- Any other collection name of your choice can still be entered,
document creation will be handled as described above in 'Create New Document'.
-
2 - Edit document content
- Edit the document fields
- If all the documents in the collection have the same 'structure', i.e. same fields,
then the initial document content showing will be those fields.
(In the above example the fields are: 'ID Type' & 'Name') - If not all documents share the exact same fields,
then the initial document content will be just the initial template as in 'Create New Document'.
-
3 - Click
Save
when done
Create New Document from Clone
- A new document can be created by cloning (creating a copy without attachments) from an opened document view
- The clone can be saved with a new ID
Document ID Types - Examples
IDs Examples
-
Semantic ID
This ID was generated by entering the actual string in the document ID.
i.e. "users/ayende@hr.com" -
Server-Side ID
This ID was generated by entering: "users/" in the document ID.
Note: the first document was created from node 'A' while the other one from node 'B'. -
Identity
This ID was generated by entering: "users|" in the document ID. -
GUID
This ID was generated by leaving the document ID field empty and just clicking 'Save'