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 + "'");
List<Page> pages = (List<Page>)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.

Reply via email to