Skip to content

Commit 1a9518f

Browse files
author
KoLiBer
committed
docs: change README
1 parent fa003a5 commit 1a9518f

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,19 @@ import { FilterCrudRepositoryMixin } from "loopback-component-filter";
3939

4040
export class UserRepository extends FilterCrudRepositoryMixin<
4141
User,
42+
string,
4243
UserRelations
43-
>(configs)() {
44+
>({
45+
id: "id",
46+
where: async (
47+
context,
48+
where
49+
) => where;
50+
fields: async (
51+
context,
52+
fields
53+
) => fields;
54+
})() {
4455
// ...
4556
}
4657
```

sources/src/repositories/filter.repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export interface RepositoryConfig<
3535
ModelID,
3636
ModelRelations extends object = {}
3737
> {
38-
id: string;
38+
id: keyof Model;
3939
where: (
4040
context: FilterContext<Model, ModelID, ModelRelations>,
4141
where: Where<Model>

0 commit comments

Comments
 (0)