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
{{ message }}
This repository was archived by the owner on Jun 22, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: docs/options.md
+2
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,8 @@ This interface is user-defined hence not contained in this package, the interfac
23
23
24
24
When using js-entity-repos all entities should have a single unique identifier (the [`id`](#id) property) because the Facade functions do not support composite keys. There are a number of pros and cons to this that you can discover with a little Googling, but be aware that some databases actually enforce a single identifier anyway (such as Mongo). The main reason composite keys are not supported here is that it simplifies routing in HTTP implementations of the Facade such as [Axios](https://github.com/js-entity-repos/axios) and [Express](https://github.com/js-entity-repos/express).
25
25
26
+
It's usually useful and recommended to create your own Entity interface to use as a base interface for your entities. This is useful for adding common properties across your entities such as timestamps (like `createdAt` and `updatedAt`). Since the js-entity-repos make no attempt at validation, you might also find it useful to use a validation package like [Rulr](https://www.npmjs.com/package/rulr).
0 commit comments