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
but then is a override use = CalendarEvent still needed?
Or does the docs need a rework?
I mean the docs doesn't mention that I can give the Repository a generic.
I just looked into the source code.
In repository I see use?: typeof Model;, but couldn't it be changed to use?: M;?
I mean it would be easier to just use extends Repository<BLA> instead of override use = BLA.
Edit0:
I also saw that orderBy just has the model value any instead of M or Model.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I tried it with
useRepo(CalendarEvent)
anduseRepo(CalendarEventRepository)
where I usebut as example using
where
the type is alwaysmodel
.Is that intended so that I need to use as example
?
Or can I get a typed where with the correct entity?
Edit:
I see now I can do
but then is a
override use = CalendarEvent
still needed?Or does the docs need a rework?
I mean the docs doesn't mention that I can give the
Repository
a generic.I just looked into the source code.
In
repository
I seeuse?: typeof Model;
, but couldn't it be changed touse?: M;
?I mean it would be easier to just use
extends Repository<BLA>
instead ofoverride use = BLA
.Edit0:
I also saw that
orderBy
just has the model valueany
instead ofM
orModel
.Beta Was this translation helpful? Give feedback.
All reactions