Re: New registered objects and select queries

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Oct 02 2005 - 10:48:09 EDT

  • Next message: Oscar Picasso: "Postgresql Blob/LargeObject support in Cayenne"

    I'd say this is impossible. Queries are only done against DB.

    Andrus

    On Oct 1, 2005, at 3:50 PM, Oscar Picasso wrote:

    > 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



    This archive was generated by hypermail 2.0.0 : Sun Oct 02 2005 - 10:48:12 EDT