hi,

The app engine JDO documentation goes into this in more detail-- take a
look at the discussion of the field types.
The
https://developers.google.com/appengine/docs/java/datastore/jdo/dataclasses

A serialized field is stored as a blob property.  You can use it to set a
field of your instance to some (serializable) object, with the
serialization and deserialization handled for you. Blob values are not
indexed and cannot be used in query filters or sort orders.
You might want to use a serialized field if you have an object that should
be part of an entity, and is not a 'core type' (or supported collection),
and whose contents don't need to be indexed-- in that case it's often
simplest to just serialize it wholesale.

If your field is a core type (like Integer), you don't need to serialize it
-- just annotate it as 'unindexed' if you don't want it indexed.

On 15 August 2012 09:15, applehund <[email protected]> wrote:

> *bump bump*
>
>
> On Sunday, August 12, 2012 1:59:23 PM UTC-7, applehund wrote:
>>
>> Hi there, can anyone explain the pros & cons of these two styles? Like if
>> I have an Integer member variable:
>>
>> *@Persistent*
>> *private* Integer foo;
>>
>> *@Persistent(serialized = "true")*
>> *private* Integer foo;
>>
>> I do know that with the serialized version I have to always mark it dirty
>> with *JDOHelper.makeDirty(...).*
>> *
>> *
>> Is there a speed performance boost for serialized? A storage size
>> decrease? Why wouldn't I just use *@Persistent *always?
>>
>> Thanks everyone!
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/EJuts8ODccwJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

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

Reply via email to