New registered objects and select queries

From: Oscar Picasso (oscgoogl..ahoo.com)
Date: Sat Oct 01 2005 - 15:50:10 EDT

  • Next message: Andrus Adamchik: "Re: New registered objects and select queries"

    Hi,

    Using a single DataContext I do the following:
    ...
    Person person = new Person();
    person.setName("Marc");
    context.registerObject(person)

    // if ommitted, results will not contain person
    context.commitChanges();

    SelectQuery query = new SelectQuery(Person.class);
    List results = context.performQuery(query);
    ...

    With that code, the results list contains person.

    However if I ommit the line:
    context.commitChanges()
    person does not appear in the result.

    Ideally I would like person to appear in both cases. Is it simply impossible or
    do I need to do something else?

    Thanks

    Oscar

                    
    __________________________________
    Yahoo! Mail - PC Magazine Editors' Choice 2005
    http://mail.yahoo.com



    This archive was generated by hypermail 2.0.0 : Sat Oct 01 2005 - 15:50:12 EDT