Quantcast

Is there a way of adding named queries into a base class?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Is there a way of adding named queries into a base class?

fumbles
I have a few entities that inherit from a base class.  There are a few query criteria i would like to share across all the objects via named queries.  Is there any way of accomplishing this?

The base class has properties for an effective start date and effective end date.  A common criteria for queries is to return the entities when the current date falls between those dates.  I was hoping to encapsulate that criteria in the base class (where the properties are) and reuse it in other criteria, but can't find a way of doing it.

Thanks,

Tom
Loading...