How to remove property of java object(POJO) with safty?

1,853 views
Skip to first unread message

sea

unread,
Nov 23, 2009, 10:34:33 PM11/23/09
to Google App Engine
Hi

Environment :GAE for java, JPA

I defined a java object(POJO) and stored some data in it. But later I
found a property of that java object(POJO) was useless,
and there was no data in that property.So I removed that property, but
that caused a big problem, the data in that
java object(POJO) can not be displayed by program.

So could you tell me how to deal with it? I want to remove the useless
property of java object(POJO) , and want original data can be
displayed by program.

Thanks a lot.

Ikai L (Google)

unread,
Nov 25, 2009, 4:47:51 PM11/25/09
to google-a...@googlegroups.com
App Engine uses "soft schemas" for its entities. That is, if you still need to read from a property but no longer need to write from it, simply leave the property field in your entity. You won't be able to display the property if you remove it from your entity, but you can build your application such that it does not accept new writes to the property.

Here's a pretty good session from Google I/O 2009 that discusses this: http://code.google.com/events/io/2009/sessions/SofterSideofSchemas.html

Hi
--

You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.





--
Ikai Lan
Developer Programs Engineer, Google App Engine
Reply all
Reply to author
Forward
0 new messages