That's not quite correct - in the low-level datastore, this isn't an
issue because absent properties will simply be missing from the
Entity.

In Objectify, absent properties are ignored.  You can add fields of
primitive types without ill effect - they will simply have their
default values.  This is very useful when you add fields, or flag
fields as not-saved when they have certain values (ie the default).

I believe JPA/JDO will throw exceptions if you add a primitive type
field to your entity and there is no corresponding property in the
underlying loaded Entity.  This is very poor behavior, IMHO.  It
creates a very brittle structure.

Jeff

On Mon, Mar 12, 2012 at 4:12 AM, Matthew Jaggard <matt...@jaggard.org.uk> wrote:
> This answer also applies to the low level datastore and Objectify. I can
> only assume JPA works the same way.
>
> On Mar 12, 2012 7:40 AM, "andrew" <andrew.macken...@bcntouch.com> wrote:
>>
>> Nulls (Java), if the object can have null as a value. E.g. Integer can be
>> null, int cannot.
>>
>> I think this is explained in GAE/JDO documentation.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/google-appengine-java/-/GBfSKyvTztcJ.
>> To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
> --
> 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 group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.

-- 
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 group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to