Skip to content

Commit 30ffa18

Browse files
committed
Undo changes on ".with()" method
1 parent f85f778 commit 30ffa18

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/drivers/default/builders/queryBuilder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class QueryBuilder<
3232
protected modelConstructor: ModelConstructor<M, Attributes, PersistedAttributes, Relations, Key>;
3333
protected httpClient: HttpClient;
3434

35-
protected includes: ModelRelations<Relations>[] = [];
35+
protected includes: string[] = [];
3636
protected fetchTrashed: boolean = false;
3737
protected fetchOnlyTrashed: boolean = false;
3838
protected withCountRelations: ModelRelations<Relations>[] = [];

src/types/AggregateItem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ModelRelations } from './ModelRelations';
22

33
export type AggregateItem<Relations> = {
4-
relation: string & ModelRelations<Relations>;
4+
relation: ModelRelations<Relations>;
55
column: string;
66
}

tests/stubs/models/tag.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import { Model } from '../../../src/model';
22
import Post from './post';
33
import { BelongsToMany } from '../../../src/drivers/default/relations/belongsToMany';
4+
import { DefaultPersistedAttributes } from '../../../lib/types/defaultPersistedAttributes';
45

56
export default class Tag extends Model<{
67
content: string;
7-
}> {
8+
}, DefaultPersistedAttributes,
9+
{
10+
posts: Post[];
11+
}> {
812
$resource(): string {
913
return 'tags';
1014
}

0 commit comments

Comments
 (0)