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. >
