final List<PublisherHourlyStats> pubStats = db.datastore.find(PublisherHourlyStats.class).asList();
It basically means you have an embedded element, where a reference is
expected. What does your document look like in mongodb?
datastore.update(
datastore.createQuery(PublisherHourlyStats.class).field("y").equal(date.getYear()).field("m")
.equal(date.getMonthOfYear()).field("d").equal(date.getDayOfMonth()).field("h")
.equal(date.getHourOfDay()).field("pub").equal(bid.publisher), datastore
.createUpdateOperations(PublisherHourlyStats.class).inc("bids").set("pub", bid.publisher), true);
Nope, unfortunately the update is storing an embedded element, not a
reference. You need to convert it on your own for the workaround:
ds.getKey(bid.publisher) instead of bid.publisher. In the context of
an update there is no way to know if you mean to store an embedded
element, or a reference to it.
Nope, unfortunately the update is storing an embedded element, not a
reference. You need to convert it on your own for the workaround:
ds.getKey(bid.publisher) instead of bid.publisher. In the context of
an update there is no way to know if you mean to store an embedded
element, or a reference to it.