Just to clarify, I'm using Spring to load up my persistence layer, and
my persistence.xml is

    <persistence-unit name="main">
 
<provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</
provider>
        <properties>
            <property name="datanucleus.NontransactionalRead"
value="true"/>
            <property name="datanucleus.NontransactionalWrite"
value="true"/>
            <property name="datanucleus.ConnectionURL"
value="appengine"/>
        </properties>
    </persistence-unit>

which means it is DataNucleus that is providing my
EntityManagerFactory and hence EntityManager, so any JPA Queries that
get created from this should default to JPQL syntax. No?

thanks,
dave

On Oct 31, 11:56 pm, Dave Cheong <d...@davecheong.com> wrote:
> Thanks for the prompt reply. Couple of quick questions to follow up:
>
> 1) I can't seem to get "!=" working either. Getting a -
>
> org.datanucleus.store.query.QueryCompilerSyntaxException: Portion of
> expression could not be parsed: != :p_1
>
> for query
>
> SELECT o
> FROM MyClass o
> WHERE o.title = :p_0
> AND o.myProperty != :p_1
>
> 2) If I have mapped my objects using JPA annotations, will the query
> engine default to JDOQL vs JPQL? I'm currently using the JPQ
> EntityManager to create by Query ala:
>
> Query query = entityManager.createQuery(queryString)
> // bind parameters
>
> Shouldn't that automatically make my Queries compile to JPQL?
>
> Also, if using EntityManager, I won't be able to go:
>
> pm.newQuery("javax.jdo.query.JPQL", "SELECT p FROM Person p WHERE
> p.lastName = 'Jones'");
>
> ... as your link above suggests.
>
> Am I on the wrong track here? Please help.
>
> Thanks,
> dave
>
> On Oct 31, 11:30 pm, datanucleus <andy_jeffer...@yahoo.com> wrote:
>
>
>
> > > If you want to use JPQL, or SQL
>
> > Except that GAE/J won't support SQL, but does support JPQL
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to