1
votes

A few days ago I've started developing a Backend for Mobile Applications using Google App Engine and Google Cloud Endpoints.

Initially I deployed a first version with the following entity fields:

  @Entity
public class Tweet {

  @Id
  private String id;
  private String user;
  private String text;
  private String date;
  private int count;
  private String linkTweet;

After a while, I added other fields:

@Entity
public class Tweet {

  @Id
  private String id;
  private String user;
  private String text;
  private String date;
  private int count;
  private String linkTweet;
  private String imageHttp;
  private String imageHttps;
  private String userId;

In the datastore I see changes, but when I go to https://myappid.appspot.com/_ah/api/tweetendpoint/v1/tweet I see only the old fields, there aren't the imageHttp imageHttps userId fields :(

Where I'm wrong?

2

2 Answers

0
votes

I did the same change and it works fine. The only difference between my code and yours is that I am using JDO and have the tag (@Persistence) before each attribute.

@PersistenceCapable(detachable="true")
public class Test implements Serializable {

  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  private String id;
  ...
  @Persistent
  private String newAttribute;
}

NOTE: if you don't have data in new fields, you will not see them in response.

0
votes

This is an appengine issue. Google guys should fix it soon:

https://code.google.com/p/googleappengine/issues/detail?id=9686