Pinaki Poddar wrote:
>
> try:
> javax.persistence.Query q = em.createQuery(aJPQLString);
> q.setHint("openjpa.Subclasses", "false");
>
This promises to be exactly the solution I need to an optimization
issue...but it does not work for me in OpenJPA 1.2.1. The 1.2.x
documentation does not mention this parameter anywhere I could find, but the
'org.apache.openjpa.persistence.HintHandler' class in OpenJPA 2.0 does. I
assumed this must be a 2.0 feature.
So I fell back to trying openjpa.jdbc.SubclassFetchMode, but the child
classes were returned. I tried annotating with
'@SubclassFetchMode(value=FetchMode.NONE)', but again the child classes were
returned. I then searched through the 1.2.1 source code and found, to my
surprise, at
'openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java'
in the 'setHint' function that this is indeed supported in 1.2.1. But
again, the child classes are returned.
Does the setHint call need to be performed in combination with something
else?
--
View this message in context:
http://n2.nabble.com/How-to-disable-jpql-Polymorphic-Queries-tp3229800p4275967.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.