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();



public class DataContext extends BaseContext implements DataChannel {

    /**
     * Returns a list of objects that are registered with this
DataContext and have a
     * state PersistenceState.NEW
     */
    @Override
    public Collection<?> newObjects() {
        return getObjectStore().objectsInState(PersistenceState.NEW);
    }

On 5/19/08, Dirk Lattermann <[EMAIL PROTECTED]> 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?
>
>

Reply via email to