Hi Paul, FWIW, I made a small change to ERXGenericRecord (integration branch) recently that allows valueForKey( primaryKeyAttributeName ) to read the PK value .... using "id" or whatever you use for PK field names to be used. This was to allow a fetch qualifier qualified on the primary key attribute to be used in both fetchspecs and in-memory qualification.
That might be a solution for what you are trying to achieve while avoiding the derived attribute altogether. -Kieran On Oct 3, 2012, at 4:34 AM, Paul Hoadley <pa...@logicsquad.net> wrote: > Hi Johann, > > On 03/10/2012, at 5:26 PM, Johann Werner wrote: > >> derived attributes are "computed" by the database and thus those values are >> only updated when an eo is fetched into memory. In your case you are >> creating a new eo that has NULL for these attributes and as long as WO uses >> that eo or its snapshot cache those values will be still NULL. You have to >> refetch the eo to update the derived attributes. > > Thanks for the explanation. Looks like a derived attribute is not the > solution for this use case, then. > > I wrote: > >>> (As an aside, last time I looked at this was a few months ago, and I swear >>> it was behaving properly then—i.e., that the derived attribute was >>> immediately visible.) > > Clearly I imagined that. > > > -- > Paul Hoadley > http://logicsquad.net/ > > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/kelleherk%40gmail.com > > This email sent to kelleh...@gmail.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com