objectify

Embedded entity reading from originaly stored as Blob

蓝咒 提交于 2021-01-29 06:38:31
问题 Migrating from AppEngine low level Datastore API to objectify 5: reading Entity gets an error. What i see using the Datastore Entity Tool is because the old data keeps "Ifont" as " Blob " instead and should become an " Embedded class " @Entity(name = "Mandant") public class Mandant implements IsSerializable { @Id private Long id; @Index private String nr = ""; private Ifont fontHeader; How do we read this Blob data? 回答1: How did you save the data into a Blob field in the first place? A Blob

Distinct using objectify

房东的猫 提交于 2020-04-11 03:10:42
问题 I am working google and engine and objectify, since for the last 3 hours i have been trying to write a distinct query in objectify. Can anyone tell me how to write a distinct query in objectify on a particular column? Regards, Sreekanth 回答1: Distinct only works with projection queries, which are not directly supported by Objectify yet. They are on the roadmap. Please star this issue: https://code.google.com/p/objectify-appengine/issues/detail?id=188 In the mean time, you can issue a low-level

Are GAE Datastore cursors permanent and durable?

≡放荡痞女 提交于 2020-03-02 07:12:22
问题 Is it correct to say that a com.google.appengine.api.datastore.Cursor simply stores an index position into a GAE Datastore index? Are cursors durable? That is, can I store a cursor permanently and reuse it again and again knowing for sure that if it was pointing to 5000th position in the index, that's where it'll point forever? What if the index shrinks to less than 5000 entries? Will using this cursor cause an error or simply return nothing? For larger indexes (say 100,000 or more entries),

Appengine DevMode : access denied (“java.lang.RuntimePermission” “accessClassInPackage.sun.security.util”)

为君一笑 提交于 2020-01-19 06:20:46
问题 I upgraded my PC to Ubuntu 12.04 and restored the backup of my workspace and Eclipse afterwards. Now when I try to start my AppEngine/GWT application I run into a problem with the java security manager. Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.security.util") at java.security.AccessControlContext.checkPermission(AccessControlContext.java:366) at java.security.AccessController.checkPermission(AccessController.java

How to find the closest point in the DB using objectify-appengine

别来无恙 提交于 2020-01-15 07:21:01
问题 I'm using objectify-appengine in my app. In the DB I store latitude & longitude of places. at some point I'd like to find the closest place (from the DB) to a specific point. As far as i understood i can't perform regular SQL-like queries. So my question is how can it be done in the best way? 回答1: You should take a look at GeoModel, which enables Geospatial Queries with Google App Engine. Update: Let's assume that you have in your Objectify annotated model class, a GeoPt property called

How to find the closest point in the DB using objectify-appengine

拥有回忆 提交于 2020-01-15 07:20:06
问题 I'm using objectify-appengine in my app. In the DB I store latitude & longitude of places. at some point I'd like to find the closest place (from the DB) to a specific point. As far as i understood i can't perform regular SQL-like queries. So my question is how can it be done in the best way? 回答1: You should take a look at GeoModel, which enables Geospatial Queries with Google App Engine. Update: Let's assume that you have in your Objectify annotated model class, a GeoPt property called

How to enable DEBUG logging on Objectify

眉间皱痕 提交于 2020-01-14 12:19:19
问题 I am working with objectify to manage data in google datastore. But in some case i would like to see a debug trail of what happens during my Key lookup or a Query I am aware of App Stats when deployed to GAE. But, is there a way to enable some sort of DEBUG logging on Objectify? Thank you 回答1: Might you be looking at something like a logger? enabling this (for Java) or this (for Python) might be a good solution for you. It logs to your console in the devserver, or directly to your admin

Querying Geopt with Objectify

别说谁变了你拦得住时间么 提交于 2020-01-13 19:21:08
问题 I am having the hardest time querying a GeoPt field with Objectify. I made sure there's an @Index annotation about the GeoPt field. However, the statement below doesn't seem to work ofy().load() .type(GeoStat.class) .filter("geoPt.latitude >=", neLat) .limit(10); Is querying GeoPt field possible in Objectify? 回答1: The datastore does not support querying a GeoPt in this way. If you wish to query on latitude, index it separately (possibly writing to a private field in an @OnSave method).

Google App Engine - Connect to remote datastore locally using Objectify

匆匆过客 提交于 2020-01-07 05:57:09
问题 I've looked everywhere and wasted a lot of time on something that I think is probably very simple. Thanks for the help in advance. I have a google app engine app using the cloud datastore written in Java. I have an entity class as follows: @Entity public class Student { @Id private Long studentId; @Index private League league; @Index private String year; private String firstName; private String lastName; ... } I have a csv file of 1K students. I need to upload this info into the cloud

Google App Engine - Connect to remote datastore locally using Objectify

女生的网名这么多〃 提交于 2020-01-07 05:57:08
问题 I've looked everywhere and wasted a lot of time on something that I think is probably very simple. Thanks for the help in advance. I have a google app engine app using the cloud datastore written in Java. I have an entity class as follows: @Entity public class Student { @Id private Long studentId; @Index private League league; @Index private String year; private String firstName; private String lastName; ... } I have a csv file of 1K students. I need to upload this info into the cloud