According to JDO, you can use PersistenceManager.getObjectsById to load multiple entity instances by their object id.
What kind of Collection does one need to use here? A Google Data Store Key does not work as object id.
...
I'm making a trivia webapp that will feature both standalone questions, and 5+ question quizzes. I'm looking for suggestions for designing this model.
Should a quiz and its questions be stored in separate tables/objects, with a key to tie them together, or am I better off creating the quiz as a standalone entity, with lists stored for ...
I have a class in which I have decrlared a serialized class to store image data
@Persistent(serialized = "true")
private DownloadableFile imageLogoFile;
Implementation of the class
public class DownloadableFile implements Serializable {
public DownloadableFile(byte[] content, String filename, String mimeType) {
super();
this....
Hello,
I'm currently developing in GAE and I have to query like this using JDO:
SELECT table1.column1, table2.column2
FROM table1, table2 WHERE
table1.column1 = table2.column1;
I tried this one but it won't work:
String query = "select from "+Assessment.class.getName()+ "a, "+
Project.class.getNa...
I have a Model UnitPattern, which reference another Model UnitPatternSet
e.g.
class UnitPattern(db.Model):
unit_pattern_set = db.ReferenceProperty(UnitPatternSet)
in my view I want to display all UnitPatterns having unit_pattern_set refrences as None, but query UnitPattern.all().filter("unit_pattern_set =", None) returns nothing,...
Hi,
I am building facebook app using iFrame (using Google App Engine Java,JSP and Facebook-api-java), and when Facebook calls back to my website, I expect to get the fb_sig_* request params for the iFrame, but I get those params in HTTP referer header instead.
When I use the php client, i get the fb_sig_* in the $[_GET] as expected.
W...
Is there a way to ensure the same PersistenceManager instance is used throughout the different code parts executed in the context of the same RPC request?
Having to manually handle out the persistence manager instance from function to function is quite a pain:
for example:
private void updateItem(ItemModel listItem)
throws ...
A friend and I are currently working on a turn-based game with chat with both desktop browser and Android clients, with Google App Engine as the server.
We're using the Java API for GAE and using HTTP for communication with the server. We've implemented simple chat functionality, and we're getting undesirable latencies 1-3 seconds from...
I have a google app engine code that tries to send a mail with an attachment of size 379KB. The mail has two recipients - one on the "To" list and myself on the "BCC" list. Apparently, GAE is treating this as 2 different mails which makes it an attempt to send mails with attachment size 758KB(379*2) and is resulting in QuotaExceededExcep...
Has anyone got any experience with the following exception when using GAE urlfetch?
DownloadError: ApplicationError: 2 timed out
I'm trying to send a HTTP POST request. Like so:
result = urlfetch.fetch('http://api.nathan.com:8080/Obj/',
method='POST',
payload=pos...
I found out that RCS for models is an interesting problem to solve in the context of data persistence. They are several solution using the django ORM to achieve this django-reversion and AuditTrail each of which propose their own way to do it.
Here is the model (in django-model-like format) which I would like to have revisions :
class ...
I am using Spring SimpleFormController for my forms and for some reason it won't go to the onSubmit method
Here's my code:
public class CreateProjectController extends SimpleFormController {
ProjectDao projectDao;
public CreateProjectController() {
setCommandClass(Project.class);
setCommandName("Project");
setSessionForm...
in theory, I want to have 100,000 entities in my User model:
I'd like to implement an ID property which increments with each new entity being put.
The goal is so that I can do queries like "get user with IDs from 200 to 300". Kind of like seperating the 10000 entities into 1000 readable pages of 100 entities each.
I heard that the ID...
We are developing a web based application in python on google app engine platform. I have different pages in web site. What I want is to have a master page like functionality like we have in asp.net where I have just on template and all other pages will use that. How can I do this? I am a beginner in python
...
so i have a User class
class User(db.Model):
points = db.IntegerProperty()
so I created 1000 dummy entities on development server with points ranging from 1 to 1000
query = db.GqlQuery("SELECT * FROM User WHERE points >= 300"
"AND points <= 700"
"LIMIT 20"
"ORDER BY poi...
Hi there,
Python Shell - shell.appspot.com is acting weird? or am I missing something?
Google App Engine/1.3.0
Python 2.5.2 (r252:60911, Apr 7 2009, 17:42:26)
[GCC 4.1.0]
>>> mycolors = ['red','green','blue']
>>> mycolors.append('black')
>>> print mycolors
['red', 'green', 'blue']
But the below result is expected
['red', 'green',...
Hey,
I need to make a list property that will contain lists, something like:
db.ListProperty(list(str))
I know list(str) is not a supported value type so as I imagined I received a "ValueError" exception.
Thought maybe there is a creative idea out there of how to overcome this :)
Thanks!
...
There seem to be 2 ways to use django 1.1 with GAE
Google App Engine helper for django
The new use_library() function
We currently use the first. Should we switch? And what's the difference between the two?
...
I am new to python. I learning this stuff because google app engine doesn't allow php.
Python is touted to be an easy and friendly language to use. But I find trying to tamper with an existing code causes indentation errors.
For example:
this piece of code
class SearchThread(Thread):
def __init__(self, s, q):
Thread.__init__(sel...
I'm creating a Trivia app, and need some help designing my model relationships. This question may get fairly complicated, but I'll try to be concise.
Trivia questions will all be part of a particular category. Categories may be a category within another category. If a trivia question is created/removed, I need to make sure that I als...