Re: Fetching through snapshot
Re: Fetching through snapshot
- Subject: Re: Fetching through snapshot
- From: Hugi Thordarson <email@hidden>
- Date: Tue, 15 Sep 2015 15:57:42 +0000
Newly inserted (uncommitted) objects are not included when you fetch. One way to get around this is to use the “objectsWithQualifier” methods of ERXEOControlUtilities to perform your fetches, they have an “includeNewObjects” parameter you use to indicate that you want to include new objects from your EC.
Cheers,
- hugi
// Hugi Thordarson
// http://www.loftfar.is/
// s. 895-6688
> On 15. sep. 2015, at 15:47, Markus Ruggiero <email@hidden> wrote:
>
> I am running into a problem with fetching. As I am away from my desk and all the books for the next couple days I kindly ask here for help:
>
> I fetch data from the database with the standard fetchAll...() method. This properly generates SQL queries delivering the requested data. Now the user manipulates the data and creates new EOs. Basically the user has a list of EOs on the left of the screen and an initially empty list on the right side. So the user picks an entry from the left, clicks a button and the action method creates an EO into the right side list and removes the clicked object (not available any more). Mind you the user does not yet activate save changes. I was under the impression that the call to fetchAll...() takes the created objects into consideration, resulting in the comibination of the db objects and the not yet db objects. But it doesn't work. Any idea how to handle such a case? I need to let the user pick more than one element from one list and remove elements from the other list several times until the user is satisfied with the assignments. Only then will he activate saveChanges(). Do I need to maintain my own in-memory structures that parallel the ec's content?
>
> This is part of a propertyLevel component in an D2W Edit page.
>
> Thanks for suggestions.
>
> ---markus---
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden