• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDO Question

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
may i ask a question about jdo?
i am using triactive jdo to do a project. i wrote a program to query the database with some condition. but when i commit the transaction, i can no longer read the properties in the object. as below.
Extent ext = pm.getExtent(User.class, true);
String filter = "account==acc";
Query q = pm.newQuery(ext, filter);
String parameter = "java.lang.String acc";
q.declareParameters(parameter);
tx.begin();
Collection c = (Collection)q.execute("admin");
ArrayList list=new ArrayList(c);
System.out.println(list.size()); //returns the amount of result
System.out.println(user); //returns user informations
tx.commit();
System.out.println(user); //returns null
can anybody tell me how to keep the informations available after "tx.commit()"?
thanks in advance.
Patrick
reply
    Bookmark Topic Watch Topic
  • New Topic