Thanks Rusty. I will keep this in mind..

On Nov 4, 12:13 am, Rusty Wright <rwright.li...@gmail.com> wrote:
> Beats me.  It seems to be some sort of pixie dust you'll often need to apply. 
>  You don't need it for String, Long, Date, and a variety of other jdk 
> classes, but I think you will need it for your classes.  I don't understand 
> why it's not used in the GAE web site's documentation.
>
>
>
> Tito George wrote:
> > Thanks, It is working. Is this an issue? Or is it specific to Text
>
> > On Nov 3, 11:00 am, Rusty Wright <rwright.li...@gmail.com> wrote:
> >> What happens if you change @Persistent to @Persistent(defaultFetchGroup = 
> >> "true")
> >> ?
>
> >> Tito George wrote:
> >>> Enviornment: Local
> >>> I have a Text field in one Persistent capable object,
> >>> @Persistent
> >>> private com.google.appengine.api.datastore.Text event_Description;
> >>> I am sure that i am not setting null into this field.
> >>> But while operating on queried object event_Description.getValue() is
> >>> throwing  NullPointerException. I am quering like this.
> >>> public static Map<Long, Event> getEvents(AppUser appUser){
> >>>            PersistenceManager pm = 
> >>> PMF.getInstance().getPersistenceManager();
> >>>            Query query = pm.newQuery(Event.class);
> >>>            query.setFilter("email == pEmail");
> >>>            query.declareParameters("String pEmail");
> >>>            List<Event> result = null;
> >>>            Map<Long, Event> eventsMap = null;
> >>>            try {
> >>>                    result = (List<Event>) 
> >>> query.execute(appUser.getEmail());
> >>>                    eventsMap = new HashMap<Long, Event>();
> >>>                    for(Event e: result){
> >>>                              //LINE TO REPLACE
> >>>                            eventsMap.put(e.getEvent_ID(), e);
> >>>                    }
> >>>            } finally {
> >>>                    pm.close();
> >>>                    query.closeAll();
> >>>            }
> >>>            return eventsMap;
> >>>    }
> >>> Its works fine if I replace above commented line(//LINE TO REPLACE)
> >>> with
> >>> String str = e.getEvent_Description();
> >>> or
> >>> sop(e.getEvent_Description());
> >>> or
> >>> e.getEvent_Description();
> >>> Any Comments???
--~--~---------~--~----~------------~-------~--~----~
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