• 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: Digester and EOs [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Digester and EOs [SOLVED]


  • Subject: Re: Digester and EOs [SOLVED]
  • From: Lachlan Deck <email@hidden>
  • Date: Fri, 25 Apr 2008 10:57:37 +1000

Hi David,

it'd be great if you can add this to the wiki...

On 25/04/2008, at 10:27 AM, David Holt wrote:

This is actually pretty straight forward to do. I don't know if this is the best way to accomplish saving XML objects as EOs, but it works and will hopefully help someone else!

The key is that Apache Digester provides the ability to create and call custom rules that have begin(), body() and end() methods when they hit an XML tag pattern. Use a custom rule instead of the stock ObjectCreateRule to create an EO and add it to an EditingContext BEFORE you start changing property values on the EO with the stock digester rules.

I'm using WOnder so i am using ERXEC for the editing context and when I add the related object with the rule (addToAuthors) I am taking advantage of the WOnder feature that automatically updates my inverse relationship. If you're not using WOnder you'll have to figure out where to addObjectToBothSidesOfRelationship ...

<...>

with regards,
--

Lachlan Deck



_______________________________________________
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


References: 
 >Digester and EOs (From: David Holt <email@hidden>)
 >Re: Digester and EOs (From: Chuck Hill <email@hidden>)
 >Re: Digester and EOs [SOLVED] (From: David Holt <email@hidden>)

  • Prev by Date: Re: Digester and EOs [SOLVED]
  • Next by Date: Re: indexing non-sorted arrays in EOs
  • Previous by thread: Re: Digester and EOs [SOLVED]
  • Next by thread: WO 5.3.x &amp workaround?
  • Index(es):
    • Date
    • Thread