http://code.google.com/appengine/docs/java/datastore/relationships.html#Dependent_Children_and_Cascading_Deletes
-
Dependent Children and Cascading Deletes
The App Engine implementation of JDO makes all owned relationships
dependent. If a parent object is deleted, all
http://code.google.com/appengine/docs/java/datastore/relationships.html
=
Child objects are loaded from the datastore when they are accessed for
the first time. If you do not access the child object on a parent
object, the entity for the child object is never loaded. (The
datastore
You have to touch child field while the parent is still managed by
PersistenceManager, before detaching (pm.close).
Something like:
PersistenceManager pm = PMF.get().getPersistenceManager();
try {
Employee e =
Look here: http://code.google.com/status/appengine
It seems that GAE Java was having some problems yesterday. Error 500
suggests some problems on the server side. But I'm guessing only.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
What you mean by:
--
I get this error (only on GAE enviroment, because on my local
development IDE work ok)...
-
You mean that your code works while running on local datastore and not
work after deploying to the google (production) environment ?
Look at:
http://www.jpox.org/docs/1_1/query_jdoql_methods.html
But I cannot tell if it is supported in GAE plugin for DataNucleus.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
Try also with two Date fields - the second keeping the year/month/date
part only
Something like:
// Entity
@Persistent
private Date birthDate;
@Persistent
private Date birthDateOnly;
public void setBirthDate(Date birthDate) {
this.birthDate = birthDate;
if
Hm Could you elaborate a little more on that ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To
But what you have while running this assert ? I dare say that
p2.getSentences.size() is 0 at that moment.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send
You are right, but 'midomarocain'' wants to keep full date (with hours/
min/secs) and in one context compare the full date and in the another
context compare the same date but using the year/month/day part only.
But, of course, it is possible to split the date to java.sql.Date and
java.sql.Time
http://code.google.com/appengine/docs/java/config/appconfig.html
May be you find there the solution, but I'm guessing only.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post
You can follow something like that
class Parent {
@Persistent
private ListLong/Key childList;
// non Persistent
private ListChild list;
...
}
class Child {
@PrimaryKey
private Long/Key key;
...
}
// before save Parent
private void beforeSave(EntityManager
It is a common problem. Read this thread:
But what class cannot be found ? Are you sure that you have put
flexjson and all necessary jars in WEB-INF/lib directory of your
project ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java
Look into this file: WEB-INF/web.xml. It looks like XML-syntax problem.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to
If you delete double declaration (String formattedDate) and add proper
imports and declaration 'Calendar cal = Calendar.getInstance()); it
should work.
But you are having this problem while running in local environment
(in your machine) or it does not work after deploying to google
(production)
Read this thread - could be helpfull :
http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/3affdf1441f864b6/99a166946ad0ef61?lnk=gstq=self#99a166946ad0ef61
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Have you enabled session ? By default it is read-only.
WEB-INF/appengine-web.xml.
sessions-enabledtrue/sessions-enabled
http://code.google.com/appengine/docs/java/config/appconfig.html
---
Enabling Sessions
App Engine includes an implementation of sessions, using the servlet
session
But how do you want to accomplish it ? There is no query like give me
the next no more than 1000 keys using filter key lastkey. Also
there is no query like give me the least key using filter key
lastkey.
--~--~-~--~~~---~--~~
You received this message because
You can run queries on keys:
http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Queries_on_Keys
The first part of child key (ContactInfo.class) contains parent
(Employee) key.
Employee e;
query = pm.newQuery(ContactInfo.class);
query.setFilter(key ==
query.setFilter(key keyParam and key keyParam1);
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To
I'm not sure if your taking of the problem is correct. To my mind it
runs:
You have Company and Employee. Company has many Employees and Employee
is working for one company. Normalized version looks like:
class Company {
@Persistent private String companyName;
@Persistent private String
But what you mean by real application ? If you want to have a server
part of your application and client part running outside Google App
Engine you can implement access to the server part and Google App
Engine datastore via servlet and standard GET/POST request.
It works for me.
I have something like:
class Employee {
...
@Persistent(mappedBy=employee)
private ListContactInfo contactInfo;
.. }
class ContactInfo {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
...}
than:
Employee e;
Replace:
@Persistent
with:
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Otherwise provide some code how you call the method
public void saveUser(User user) (I'm guessing that this method
throws exception).
particulary how the 'user' parameter is created.
Why not create simple CRUD for keeping log-id and password and
simple dialog to get login id and password and check against persisted
class being managed by this CRUD. It could be a good starting point.
--~--~-~--~~~---~--~~
You received this message because you
But do you mean GWT or Google App Engine application ?
GWT comes with embedded tomcat to keep backward compatiblity. Although
there is a warning that it is deprecated and can be deleted in the
future.
If you want to use tomcat simply start shell as it is described in
documentation for GWT 1.5
Hibernate is not JPA implementation, it exposes its own API.
Hibernate Entity Manager is a product build on standard Hibernate
and offering full JPA interface.
Google App Engine does not support Hibernate:
http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine
Look at this thread, may provide some useful information.
http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/6ae2e6737cbb4b40/f47f015099538467?lnk=gstq=administrator#f47f015099538467
--~--~-~--~~~---~--~~
You received this message because you
Some thoughts based on experience.
http://hoteljavaopensource.blogspot.com/2009/09/migration-to-google-app-engine.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to
Nobody can contradict that DataNucleus is a high quality software. The
fact that it is Google's persistence provider of choice speaks for
itself.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for
Replace:
filter-classAuthFilter/filter-class
With
filter-classcom.org.login.AuthFilter/filter-class
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send
It is a clustered environment and you cannot assume that every request
is run in the JVM. If you want to share data between requests you
should persist them (data) in datastore.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Follow this thread - could be helpful
http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/d816992c5a82506b/e50b4eb988d2f45b?lnk=gstq=comet#e50b4eb988d2f45b
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
I'm using GWT on the client side.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this
Follow this thread:
http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/3affdf1441f864b6/47e35ad2811de108?lnk=gstq=self#47e35ad2811de108
It looks like known issue.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Could you provide more details, how your entity class looks like and
how it is persisted ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to
Could you provide more details how your failing query looks like ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to
There is nothing wrong with that, it should work. Could you past also
a persiting sequence, where this exception is thrown.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to
The second. If you get an object from the cache you have the
serialized copy of the object. So to make your changes persistent
and visible by the other requests you have to put it into the cache
again. Also to have a fresh object you have to get it again. What
you have is a reference to the
That's very interesting because it works for me:
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Employee {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key id;
private String firstName;
private String lastName;
}
You need to have your data access method separated from servlet code
or RPC (if GWT is used) code.
Assume that you have something like:
class Customer {
private Key customerId;
...
}
class MyDataAccessService {
public void addCustomer(Customer c) {
...
}
and you want to test it.
De gustibus non est disputandum - if you feel more comfortable with
low-level Api than with JDO/JPA Api it is up to you. You spent two
days trying to cope with Google App Engine JPA/JDO problem, I spent a
lot of sleepless nights migrating my EJB3/JPA application to Google
App Engine keeping
If you want to clean your local datastore with respect to junit tests
- look at this link:
http://code.google.com/appengine/docs/java/howto/unittesting.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App
Obviously it will not work, makePersistentAll is nothing more than:
for (Entity e : parameter_List) {
em.makePersistent(e);
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To
You have to split your application into at least two parts: server
part (without any user interface related logic) and client side, user
interface. This client side can be java/swing (applet), or Java
Script, HTML, JSP etc.
--~--~-~--~~~---~--~~
You received this
What about using memcache as keeping cache version counter ? When
update is needed than this counter is increased. Every requests keeps
local number and at the beginning compare local counter against
memcache counter. If not equal than refresh local cache and local
cache number.
If memcache
1000 is a hard limitation on every query. So if you have 5000
entitties and use range 999-1500 you will get only one record. The
only way is to iterate through entities using JDO extend.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
I'm afraid that it is not possible.
But if the purpose of your relationship is only to manage child class
in a transactional way you don't need to keep them as a part of child
relationship.
Simply use Key type and set 'parent' part of the child' key being the
same and you can manage them in the
You hit the nail on the head. As far as I know there is nothing like
sequence in Google App Engine. Either you need to have another
entity with a counter and increase it in transactional way. Or you can
use memcache.
JSP is nothing more than servlet code woven with html and some tags to
make generating html pages more easy. Almost everything you can do in
sevlet code you can do also in JSP page. So it is a design decision
what logic should be kept in JSP and what logic should tackled in a
classic servlet
It is not possible, your query filter should contain only 'direct
attributes of the class. if you want to run query based on class
number you need to have to duplicate this property from Classroom to
Student.
But I don't understand your problem. If you have 'one to 'many'
relationship and want
I ported my Open Source EJB3/JPA application to Google App Engine many
months ago and almost at the beginning it was obvious that I had to
split my entity classes to two versions: Google App Engine and non
Google App Engine. Impossible to achieve 100% source compatibility.
Primary key not
It looks for me that you mix JPA annotations (OneToMany, Entity, Id)
with JDO api. - using PersistenceManager. It is hard to say how it
behaves and disentangle that issue.
But if you want to have bi-directional ownership - in News entity
Source instance - follow this thread, it could shed some
Do you have some more doc/java doc ? I was browsing through your page
and found nothing. As far as I caught you implemented simple set of
CRUD operations on items and simple query mechanism. Am I right ? The
decision to get rid of relationships is very sound because this GAE/J
implementation is
http://code.google.com/intl/pl/appengine/docs/java/config/appconfig.html
===
App Engine includes an implementation of sessions, using the servlet
session interface. The implementation uses the App Engine datastore
and memcache to store session data.
This feature is off by
It looks ok, the only problem I can see that something can happen
between storing book in cache and getting book from cache.
Scenario like:
1) fetch book from Amazon and store in cache.
2) book expires in Amazon (or any other event happens)
3) next request - get data from cache - you return
http://code.google.com/intl/pl/appengine/docs/java/datastore/transactions.html
Look at the next code snippet
===
for (int i = 0; i NUM_RETRIES; i++) {
pm.currentTransaction().begin();
ClubMembers members = pm.getObjectById(ClubMembers.class,
k12345);
Is it production or local (development) environment ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To
It is a clustered environment. So it is expected that the next request
is run on a different machine, JVM and all statics are reinitialized.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java
You mean Google App Engine/J implementation of this ?
http://code.google.com/intl/pl/appengine/docs/python/urlfetch/asynchronousrequests.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for
Thanks, I will try. I'm using eclipse only because of this Google
plugin, I'm rather fan of NetBeans.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send
You have now:
employee.addComputer(computer);
pm.close();
Replace with:
employee.addComputer(computer);
pm.makePersistent(employee);
pm.close();
You update entity but don't persist it again.
Also replace:
@Persistent
public SetLong computerKeys = new HashSetLong();
Follow this thread:
http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/e29a06508797545c/b456c04790f20181?lnk=gstq=webservice#b456c04790f20181
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
DM - http://vike.googlecode.com/svn/trunk/vike/src/br/com/ximp/vike/server...
Judging from above you don't use JPO but low level API. But your
entity class (Actor) is dressed with JDO annotations. I don't know
what will happen if entity dressed with JPA annotiation and beautified
by JDO enhancer
http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/b2d502bc03c83155#
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to
Sequence:
tx.begin();
,,, persist Entity group A
tx.commit();
tx.begin();
.. persist Entity group B
tx.commit();
works without any problem as designed.
You have to provide more details to tell something.
--~--~-~--~~~---~--~~
You received this message because
@Persistent(mappedBy = A)
Judging from:
http://www.jpox.org/docs/1_2/jdo/annotations.html
--
mappedByString Field in other class when the relation is
bidirectional to signify the owner of the relation
--
'mappedBy' does not make any sense outside relationships.
In Polish language it is called a discussion o wyższości Swiąt
Wielkiej Nocy nad Swiętami Bożego Narodzenia.- in English it is a
discussion on superiority Christmas over Easter or vice versa or
simply discussion on nothing.
So it is like discussion on what is better: GWT, JQuery, Dojo, Ext-
Gwt,
http://code.google.com/intl/pl/appengine/docs/java/datastore/transactions.html
for (int i = 0; i NUM_RETRIES; i++) {
pm.currentTransaction().begin();
ClubMembers members = pm.getObjectById(ClubMembers.class,
k12345);
It looks like GWT (not Google App Engine) problem:
http://code.google.com/intl/pl/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html#DevGuideModules
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine
It is not supported in Google App Engine JPA/JDO
http://code.google.com/intl/pl/appengine/docs/java/datastore/usingjdo.html#Unsupported_Features_of_JDO
Join queries. You cannot use a field of a child entity in a filter
when performing a query on the parent kind. Note that you
Follow that thread:
http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/8145f547cbaff99e/453847dda0217e71?q=#453847dda0217e71
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to
http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group,
This type of tests works for me without any problem. Could you provide
more details and what you mean exactly by system was unable to read
it ?
--
You received this message because you are subscribed to the Google Groups
Google App Engine for Java group.
To post to this group, send email to
If you use pure long primary key than it can impact transactional
mechanism which is related to so called entity groups identified by
primary key values.
So before designing your entity classes read through:
http://code.google.com/intl/pl/appengine/docs/java/datastore/transactions.html
--
You
Judging from:
http://code.google.com/intl/pl/appengine/docs/java/howto/unittesting.html
---
if every test starts with a clean datastore
---
it clears local datastore every time - so it works as expected.
But may be after removing line:
datastoreService.clearProfiles();
Inheritance and class hierarchy is very important in OOP but it has a
different meaning when it comes to persistence. You cannot take
advantage of OOP concepts like: encapsulation, polymorphic etc. So, as
Ikai pointed above, you can run into over-engineering trap going that
way.
In my opinion the
78 matches
Mail list logo