Re: Partially saving the object graph. How? (Jean Pierre Malrieu)
Re: Partially saving the object graph. How? (Jean Pierre Malrieu)
- Subject: Re: Partially saving the object graph. How? (Jean Pierre Malrieu)
- From: "Jerry W. Walker" <email@hidden>
- Date: Mon, 19 Mar 2007 20:26:01 -0400
Hi, Jean Pierre,
I think this is a wonderful exercise for a graduate level EOF course
(if such were to exist).
However, if I ever found any of these "solutions" to the ostensible
design problem in a production application that I were responsible
for maintaining, my first move would be to Subversion's blame
operation followed immediately by efforts to take out a contract on
the life of the responsible coder.
In other words, I agree with everyone who is suggesting that the very
obtuseness of the "solutions" strongly suggests (nay, DEMANDS) redesign.
I think you should open the covers a bit on the real problem and
perhaps the help you receive here would satisfy the maintenance
programmer who follows you as well as it would you.
When I was a brand new programmer, I chanced to meet the late Dr.
Richard Hamming at Bell labs ( http://en.wikipedia.org/wiki/
Richard_Hamming ). I was awed. When I asked him what advice he would
give to a novice programmer, without hesitation he said, "Always
write code that will be clear to the maintainers who follow you. The
computer will always understand what you're writing, whether you do
or not. However, your mark as an excellent professional programmer is
made when your maintenance programmers can easily understand it as
well as you do."
I've often found that when I failed to follow his advice, I ended up
as the maintenance programmer who was the one having trouble
understanding what I had earlier written.
He was right then, he's right now.
Regards,
Jerry
On Mar 19, 2007, at 6:05 PM, Ken Anderson wrote:
You guys are all nuts! I strongly suggest finding a way around the
problem that does not include hacking EOF.
On Mar 19, 2007, at 5:58 PM, Mike Schrag wrote:
childEC.saveChanges()
parentEC.saveChanges
If you don't save the parent, the changes won't be saved to the
database.
right, yes, my bad ... so just to be clear, Chuck is saying in
ADDITION to childEC.saveChanges(), you also then do a
parentEC.saveChanges() (childEC.saveChanges() commits to parent,
then parentEC commits to the database .. well assuming it's not
itself a child of another EC).
ms
--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems
email@hidden
203 278-4085 office
_______________________________________________
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