I had faced a simillar issue. So i introduced add() method
and initialize the list if it is null.
In your example,

                       Make temp = pm.getObjectById(Make.class, makeKey);
                       temp.getModels().add(model);
                       temp.addOption(optionKey);
                       pm.makePersistent(temp);

class Make {
          ...
          public void addOption(String key) {
                   if(options == null){
                              options = new ArrayList<String>();
                   }
                   options.add(key);
          }
}


Does any one know better way doing this ?


On Mon, Aug 17, 2009 at 4:04 PM, zhiqiang huang <[email protected]> wrote:

> Good idea...but where is the log? I'm using development server running on
> localhost.
>
> On Mon, Aug 17, 2009 at 6:31 PM, datanucleus <[email protected]>wrote:
>
>>
>> Why not just look at the log (DEBUG level) since it tells you what
>> fields are loaded in what object and what the object states are.
>>
>>
>
>
> --
> Huang Zhiqiang
> Computer Science College
> Zhejiang University
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 [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-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to