You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nuxt Content V3 automatically assigns unique IDs to documents in its underlying database system. I'm considering using these IDs as reference pointers in my backend system.
Questions
How reliable and consistent are these automatically generated document IDs?
What happens to document IDs in specific scenarios:
When a document is deleted, is its ID permanently retired?
Can newly added documents reuse IDs from previously deleted documents?
Use Case Context
I need to understand the ID behavior to determine if they're suitable for use as stable references in external systems, particularly our backend services.
The text was updated successfully, but these errors were encountered:
They are reliable yes. IDs consist of Collection name and file path.
I assume you don't have two files with the same path in a collection and you can use the id column to retrieve and manage content.
So if i delete a file from a path and then recreate it. It will have the same ID? in the sense it's deterministic?
Also looking at this comment #1797 (comment) I am a bit confused as do we commit the db or gitignore it. and what are the implications of both in this context (making sure that my Ids are consistent when used with an external system like a custom backend).
Nuxt Content is still a file-based content management module and the ground truth is the content files. However in order to improve performance and type safety the module leverages the database in production.
I suggest not modifying the contents in production, because the module is not designed for this purpose and you may find unexpected behaviors In edge cases. (This feature is not planned for v3 but might be supported in the future)
But as for IDs, you can trust ids to retrieve and fetch the contents from an external system.
Background
Nuxt Content V3 automatically assigns unique IDs to documents in its underlying database system. I'm considering using these IDs as reference pointers in my backend system.
Questions
How reliable and consistent are these automatically generated document IDs?
What happens to document IDs in specific scenarios:
When a document is deleted, is its ID permanently retired?
Can newly added documents reuse IDs from previously deleted documents?
Use Case Context
I need to understand the ID behavior to determine if they're suitable for use as stable references in external systems, particularly our backend services.
The text was updated successfully, but these errors were encountered: