Re: Best way to update relationships on fetch
Re: Best way to update relationships on fetch
- Subject: Re: Best way to update relationships on fetch
- From: John Boynton <email@hidden>
- Date: Sun, 12 Oct 2003 06:46:15 -0600
Ray,
Do you need an age grouping table at all? Could you use a derived
attribute in your people entity that will calculate the age grouping
when the table is fetched?
John
Ray Ackland wrote:
Sorry the title couldn't be more descriptive :)
I am working with two tables - people (who have a dob) and age
groupings. The idea is to classify people into different tiers based on
their age, and report on the numbers of people in each group.
The problem I am faced with is how to update the relationship between
the individual people and the category they fit into. I need to update
the relationships as I am preparing the report (not when the people are
added to the database) because the user will have the ability to alter
the age ranges for each group, not to mention people moving from one
group to the next as they age.
One possibility I have imagined is using the awake from fetch to
check/correct the ageGroupID (foreign key) as each person is loaded. I
believe the problem with this is that the fetch has already happened,
and the relationship would need to be invalidated and re-fetched before
the report can be created. Would this cause a loop? Can I just
invalidate the relationships to achieve this? Is this re-faulting?
As frustrating as all this is, I must admit that there is some enjoyment
to adding a little bit more knowledge to my WO understanding each time I
overcome another obstacle (as Steve Jobs said - "5% down, 95% to go").
Ray.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
--
** John Boynton, Web Development Engineer
** Art & Logic - software development outsourcing since 1991
** jboynton-at-artlogic-dot-com - http://www.artlogic.com
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.