Re: Flattened Relationships and storedValueForkey()
Re: Flattened Relationships and storedValueForkey()
- Subject: Re: Flattened Relationships and storedValueForkey()
- From: Florijan Stamenkovic <email@hidden>
- Date: Sat, 25 Oct 2008 10:42:03 -0400
Without knowing exactly what the problem is, I'd just suggest that
you skip flattening in the model, and do it in Java. You'll avoid
this problem, and you'll also have more control over value caching
(which could be what is producing the erroneous result). While
getting the same result.
Also, if you're doing this on the client, I definitively recommend
using JBND to do it, you'll get (for 5 lines of code or something):
- lazy init of the flattened value
- value caching
- automagic change detection and refreshing (when a relevant change
on the keypath changes the cache is release and the value re-
evaluated next time you ask for it)
F
On Oct 24, 2008, at 11:01, David Avendasora wrote:
Hi all,
I am trying to flatten some relationships for connivence sake. For
example:
Here's the structure:
RoutingComponent <<-> RoutingStep <<-> Routing <<-ManufacturingLine
I'm flattening the routingStep().routing().manufacturingLine()
relationship on RoutingComponent into simply manufacturingLine().
Sure, I could easily write my own convenience method to do this,
but I figured this is exactly one of the things that flattening is
for.
The problem is:
foo.storedValueForKey("manufacturingLine") returns null,
But,
foo.valueForKeyPath("routingStep.routing.manufacturingLine")
returns the expected ManufacturingLine.
I've made substantial changes to my Veogen templates, but I don't
see the standard ones handling this either for flattened
relationships.
Am I just horribly abusing flattening?
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
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