Milosz -

Good catch! I'm not sure how I missed that method on the interface.

Thanks,
Rick

On Sat, Aug 14, 2010 at 4:37 AM, Miłosz Tylenda <[email protected]> wrote:

> Hi!
>
> Also, if you are on OpenJPA 2.0, see the Query.getParameters() method. JPA
> 2.0 introduced a few methods on the Query interface [1] which might help you
> here.
>
> Greetings,
> Milosz
>
> [1] http://download.oracle.com/javaee/6/api/javax/persistence/Query.html
>
> >
> > I want to pass to a generic EntityManager an Entity and the name of a
> > NamedQuery. I then want to createNamedQuery using the name passed as a
> > parameter. Now the problem - I need to setParameter, the parameter
> > name/value would be different for each NamedQuery. Is there a way to
> > dynamically determine the name of the expected parameters? Then I could
> use
> > reflection to extract the value from the input Entity bean and supply as
> > input to the setParameter.
> >
>

Reply via email to