Re: SelectQuery and new objects

From: Dirk Lattermann (dlat..lqualonde.de)
Date: Mon May 19 2008 - 15:59:39 EDT

  • Next message: Mike Kienenberger: "Re: SelectQuery and new objects"

    Am Montag, den 19.05.2008, 15:34 -0400 schrieb Mike Kienenberger:
    > It's true for all queries, but you can always ask the ObjectContext or
    > DataContext for the list of new objects:
    >
    > public interface ObjectContext extends Serializable {
    >
    > /**
    > * Returns a collection of objects that are registered with this
    > ObjectContext and
    > * have a state PersistenceState.NEW
    > */
    > Collection<?> newObjects();

    Ok, thanks.
    This always returns all new objects, though. So it seems they must be
    filtered by hand to get something like the result of a qualified query.

    Thank you anyway,
    Dirk

    > On 5/19/08, Dirk Lattermann <dlat..lqualonde.de> wrote:
    > > Am Montag, den 19.05.2008, 14:20 -0500 schrieb Robert Zeigler:
    > >
    > > > The select query is going to run against data in the database, and
    > > > will therefore /not/ return newly created but as yet uncommitted
    > > > objects.
    > > >
    > >
    > >
    > > Aha, thank you! Is this true for all Query classes in Cayenne? In other
    > > words, is there a Query (or some other means) to fetch uncommitted
    > > objects?
    > >
    > >



    This archive was generated by hypermail 2.0.0 : Mon May 19 2008 - 16:00:15 EDT