Hello!
Please, could anybody give me a simple _step-by-step_ instruction of
how to select long Strings(Text) from Datastore?

Here is my Database Object:
*************************
@PersistenceCapable(identityType = IdentityType.APPLICATION,
detachable="true")
public class Captions {

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;

/*
@Persistent(serialized="true", defaultFetchGroup="true")
    private Text captions_label;
*/
    @Persistent(serialized="true", defaultFetchGroup="true")
    private Blob captions_label;
*************************

I've tried both "new Text(myString)" and "new Blob(myString.getBytes)"
to store in these fields, but no luck.
I always get an Exceptions either ClassCast like "String cannot be
casted to Blob", or "There is a String inside Datastore, but must be
Blob" or something similar.

Please, give me a code sample, it should not be a very difficult task.

I'm wasted 2 days and... got nothing :-|

Please, help.

--~--~---------~--~----~------------~-------~--~----~
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