Max Ross just posted a blog post about this: http://gae-java-persistence.blogspot.com/2010/01/querying-with-key-parameters.html
<http://gae-java-persistence.blogspot.com/2010/01/querying-with-key-parameters.html>It sounds like you are enforcing the uniqueness constraint by encoding it as a Key - that's exactly what he's talking about here. On Sat, Jan 16, 2010 at 10:35 AM, tal <[email protected]> wrote: > Hi, > I'm trying to use a Key inside a query filter. I am using this to > enforce uniqueness on a field (GAE does not support unique > constraint) . > In my query I try to fetch from ser a user with same name as the > entered one, but with different key (if I get no result - user name is > not taken). > This approach works like wonders in the development environment, but > crashes and burns in the deployed environment. > > I get an exception: > Nested in org.springframework.web.util.NestedServletException: Request > processing failed; nested exception is > javax.jdo.JDOFatalUserException: Illegal argument > NestedThrowables: > java.lang.IllegalArgumentException: __key__ filter value must be a > Key: > javax.jdo.JDOFatalUserException: Illegal argument > at > org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException > (NucleusJDOHelper.java:344) > at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:275)... > > again - this works in development environment. > any suggestions? > > -- > 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 > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > > > -- Ikai Lan Developer Programs Engineer, Google App Engine--
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 [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
