Hello,

I am new to google app engine and i am having some trouble in saving
some data.
I have a  class that have lists, those list have been 'declared'
persistent and i don't want any relation to be involved. However when
i try to save the object the data on the lists aren't saved. From what
i read of the documentation i should be able to save the lists without
any problem.
Here is the relevant code:

@Persistent
private List<Long> incomingFollowRequest;

public User(String name, String screenName, String adress, String
zipCode, String email)
{
        this.name= name;
        this.screenName= screenName;
        this.adress= adress;
        this.zipCode= zipCode;
        this.email= email;
        this.incomingFollowRequest= new ArrayList<Long>();
        this.messageManager= new MessageManager();
        this.following= new ArrayList<String>();
        this.followedBy= new ArrayList<String>();
        this.incomingFollowRequest.add(11l); // to see if the data is being
saved
}

user= new User("Test 2", "Bla2", "CCCCC2", "guess it 2",
"t...@da.com");
CommonDbCommands.AddUser(user);

static public void AddUser(User user)
{
        PersistenceManager pm = PMF.get().getPersistenceManager();
        Transaction tx= pm.currentTransaction();
        try
        {
                tx.begin();
                pm.makePersistent(user);
                tx.commit();
        }
        finally
        {
                if(tx.isActive())
                {
                        tx.rollback();
                }
                pm.close();
        }
}
--~--~---------~--~----~------------~-------~--~----~
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