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
While coding abstract classes for my application, I would like to use generic types as their entities and be able to execute a query.
Actual Behavior
I've created an abstract class that is extended by my entity services. While doing so, I have some methods that can execute queries. Everything is working as expected, but my type system breaks as soon as I use any method that uses FindCondition as an argument. Here is a minimal example:
And always use DomainEntity instead of E, it works as expected.
So, it seems that FindConditions<E> is not considering the keys of the DomainEntity abstract entity class. Since it has id but the selector is complaining, saying that I can't use ID as a selector.
The text was updated successfully, but these errors were encountered:
Issue Description
Expected Behavior
While coding abstract classes for my application, I would like to use generic types as their entities and be able to execute a query.
Actual Behavior
I've created an abstract class that is extended by my entity services. While doing so, I have some methods that can execute queries. Everything is working as expected, but my type system breaks as soon as I use any method that uses
FindCondition
as an argument. Here is a minimal example:At the
getEntityPolicies
method, the selector I'm building is giving me the following error:But, here is the
DomainEntity
entity that I'm using:Also, if I change my class to:
And always use
DomainEntity
instead ofE
, it works as expected.So, it seems that
FindConditions<E>
is not considering the keys of theDomainEntity
abstract entity class. Since it hasid
but the selector is complaining, saying that I can't use ID as a selector.The text was updated successfully, but these errors were encountered: