Re: Adding new Entity properties causes old entity records not to be found in appengine queries

2011-05-14 Thread David Chandler
Hi Owen,

You'll have better luck with this question on the appengine-java group, I
think.

/dmc

On Fri, May 13, 2011 at 12:16 AM, Owen Ilagan oila...@systemacorp.comwrote:

 Until recently, adding new properties to an existing entity used by an
 application just involved adding the new properties and setters/
 getters to the entity class. The currently existing records that do
 not have the new properties could still be found by queries. However,
 we found that our application could no longer find old records after
 adding a few new properties to our entity. Since this was a live
 application, we reverted the app back to its previous state and it is
 now able to find the old records again. But now we cannot add the new
 properties needed to update the application without losing the old
 records.

 The entity class in question uses JDO and the following annotations:
 @PersistenceCapable(identityType = IdentityType.APPLICATION)
 public class Page implements Serializable {
private static final long serialVersionUID = 1L;
@PrimaryKey
@Persistent
private String ID;
@Persistent
private String status;
   ...

 And this is the query code that searches for records using JDO
 Persistence Manager:
 Query query = pm.newQuery(Page.class);
 query.setFilter(ID == ' + ID + ');
 ListPage pages = (ListPage)query.execute();

 Now we need to add a couple of new strings and a boolean property, but
 cannot without running into the problem described earlier. This is not
 the first time however, that we've added properties to this entity
 before but we did not encounter this problem back then. Aside from
 this, we've also just recently upgraded from AppEngine 1.4.3 to 1.5.0.
 Might this be a factor in the situation that we're facing?

 - Owen

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Adding new Entity properties causes old entity records not to be found in appengine queries

2011-05-13 Thread Owen Ilagan
Until recently, adding new properties to an existing entity used by an
application just involved adding the new properties and setters/
getters to the entity class. The currently existing records that do
not have the new properties could still be found by queries. However,
we found that our application could no longer find old records after
adding a few new properties to our entity. Since this was a live
application, we reverted the app back to its previous state and it is
now able to find the old records again. But now we cannot add the new
properties needed to update the application without losing the old
records.

The entity class in question uses JDO and the following annotations:
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Page implements Serializable {
private static final long serialVersionUID = 1L;
@PrimaryKey
@Persistent
private String ID;
@Persistent
private String status;
   ...

And this is the query code that searches for records using JDO
Persistence Manager:
Query query = pm.newQuery(Page.class);
query.setFilter(ID == ' + ID + ');
ListPage pages = (ListPage)query.execute();

Now we need to add a couple of new strings and a boolean property, but
cannot without running into the problem described earlier. This is not
the first time however, that we've added properties to this entity
before but we did not encounter this problem back then. Aside from
this, we've also just recently upgraded from AppEngine 1.4.3 to 1.5.0.
Might this be a factor in the situation that we're facing?

- Owen

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.