1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-24 07:17:55 +01:00

impr: 🚸 Il metodo all ritorna le istanze con le relationships

This commit is contained in:
Maicol Battistini 2022-01-19 19:23:42 +01:00
parent 0a15ddbffa
commit bdc6cf4b5e
No known key found for this signature in database
GPG Key ID: 4FDB0F87CDB1D34A

View File

@ -42,10 +42,10 @@ export abstract class Model extends BaseModel {
* Just an alias to the get() method.
*
* Returns all the instances of the model.
*/ // @ts-ignore
static all(): Promise<PluralResponse<InstanceType<Model>>> {
*/
static all(): Promise<PluralResponse<IModel>> {
// @ts-ignore
return this.get();
return this.with(this.relationships).get();
}
setAttributes(attributes: Record<string, any>): void {