I am trying to do a simple JUnit test to execute a query like this:
Resource result = ofy().load().type(Resource.class).filter("raw =", "/Bob/-/userId/-/").first().get(); if (result != null){ System.out.println("Resulting Resource raw =" + result.getRaw()); }
The query above results for null , however, when I execute the query using id (which is a long type), I get the result. When I persisted in essence, I try to query I registered @Id and the value is 1 , so I executed the query using id to check:
Resource result = ofy().load().type(Resource.class).filter("id =", 1).first().get(); if (result != null){ System.out.println("Resulting Resource raw =" + result.getRaw()); }
As a result, result.getRaw() has /Bob/-/userId/-/ , which is really strange, should my result not be null from my first request?
source share