The thread
http://groups.google.com/group/google-appengine-java/browse_thread/thread/2acea43161d8ac5/96c77de6c686526d?lnk=gst
is dealing with the same kind of problem. Basically it's not possible
to filter on the name property. So I guess I have two ways of doing
it.
1/ Creating the key by hand
Do you need a colon in front of nameParam?
query.setFilter(name == :nameParam);
Sydney wrote:
The query returns no result.
ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment
());
ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(.))
{
Since I declared the parameter with query.declareParameters(String
nameParam);, the colon is not valid. As expected I got an exception
org.datanucleus.store.query.QueryCompilerSyntaxException: Explicit
parameters defined for query, yet implicit parameter syntax
(:nameParam) found
On Jan 27, 4:39
I used an extent to verify that a B with a B name exists.
ExtentB e = pm.getExtent(B.class);
IteratorB it = e.iterator();
while (it.hasNext()) {
B rsb = it.next();
System.out.println(rsb.getName());
Yes, as you can surmise, I'm guessing.
What's this annotation on the name property for?
@Extension(vendorName=datanucleus, key=gae.pk-name, value=true)
Sydney wrote:
Since I declared the parameter with query.declareParameters(String
nameParam);, the colon is not valid. As expected I got an
The query returns no result.
ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment
());
ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(.))
{
});
A a = new A(A);
B b = new B(B);
a.getBs().add(b);