• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Duplicating an EO and all its relationships
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Duplicating an EO and all its relationships


  • Subject: Re: Duplicating an EO and all its relationships
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 01 Aug 2003 10:55:16 -0700
  • Organization: Global Village Consulting, Inc.

Be careful of how you interpret "if it seems complicated you are not doing it right". While WO makes a lot of common programming tasks trivial it does not make everything trivial. Some things are just inherently complex. While it will make the application part of your nuclear physics application easy, it won't make the nuclear physics part easy. You'll have to wait a few centuries for that. :-)


Chuck

Albert Jagnow wrote:
I was afraid this was going to be complicated.  I guess that quote "if
it seems complicated you are not doing it right" is not always correct.
I found the code posted by Gary Teter on the Omni webobjects-dev mailing
list.  If anyone else is looking for this code you can find it by doing
a search on "deepCopy" it was posted Dec 11 2001 with the somewhat odd
subject of "Cloning an WO in Java".  Fortunately for me from my testing
so far I think this code is going to work pretty much exactly as posted.
My EOModel is setup so that the payment request owns its payment items,
but not the user, or requesting department objects (which I would not
want to duplicate).  The payment items own their account numbers, but do
not own the actual account objects, or expense code and vendor objects
(which I would not want to duplicate).  This code works well for my
situation as I do not have any objects that are not owned by the parent
eo that I would want to duplicate.  So in the end I did only need to
write a few lines of code to make this work.  Thanks for the help all.

--Albert

-----Original Message-----
From: Chuck Hill [mailto:email@hidden]

Taking (my interpretation of) Albert's example, we have a complex PO that we want to use as a template for a new, very similar PO. We want to copy the the PO and PO items as brand new objects.


This is exactly what I was trying to do.


This e-mail (including any attachments) is covered by the Electronic
Communications Privacy Act, 18 USC. 2510-2521. It is confidential and
may be legally privileged. If you are not the intended recipient, you
are hereby notified that any retention, dissemination, distribution, or
copying of this communication is strictly prohibited. Please reply to
the sender that you have received the message in error, and then delete
it. Thank you.


--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net

Progress is the mother of all problems.
- G. K. Chesterton
_______________________________________________
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.

References: 
 >RE: Duplicating an EO and all its relationships (From: "Albert Jagnow" <email@hidden>)

  • Prev by Date: Re: Unable to create page 'Main'
  • Next by Date: It it possible to check Bug Reporter reports (Was: "Cannot obtain globalId for an object which...")
  • Previous by thread: RE: Duplicating an EO and all its relationships
  • Next by thread: Re: Duplicating an EO and all its relationships
  • Index(es):
    • Date
    • Thread