I’m trying to do this:
Resource resource = (Resource) ofy().load().ancestor(new Key<Resource>(Resource.class, key)).first().getValue();
This pattern works before with v3 but with v4 it won’t because of
The constructor Key<Resource>(Class<? extends T>, String) is not visible
How to do ancestor queries with Objectify4>
You create a Key with
Key.create().