openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <>
Subject [jira] [Commented] (OPENJPA-655) Class level query filter
Date Wed, 04 May 2011 19:20:03 GMT


Pinaki Poddar commented on OPENJPA-655:

I appreciate the support for this feature. 
A type-level filter that overlays on user queries would also be parameterized for majority
of use cases. For example, an application may use the current user name/location as the global
type-level filter parameter on some entities.  
Hence we need a requirement spec on how these query binding parameters are specified and how
their values are sourced at runtime.

Those of you who are interested in this type-level filtering, please suggest the syntax of
filter specifications. 

The patch has laid out the design of this feature and the touchpoints in existing query execution
pathway to sufficient details. But it has not addressed the parameter binding issue as well.

> Class level query filter 
> -------------------------
>                 Key: OPENJPA-655
>                 URL:
>             Project: OpenJPA
>          Issue Type: New Feature
>          Components: query
>            Reporter: Pinaki Poddar
>            Assignee: Pinaki Poddar
>         Attachments: class-filter.patch.txt
> A class-level query filter that applies to all queries implicitly is a useful functionality
and available in similar software product [1].
> The base functionality is:
> a) A class can be annotated with a query
> @Entity
> @Filter(query="SELECT x FROM PObject x WHERE x.field = f1 AND x.status =! DONE")
> public class PObject {...}
> b) Any query on class PObject will augment the class-level filter predicates. 
> c) @Filter query can be parametrized. The parameters can be set on current FetchPlan.
> Will attach a draft/prototype for such functionality. Please take a look and let me know
your valued comments.
> [1]

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message