• 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: Converting NSArray Objects To EOEnterprise Objects [SORTED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting NSArray Objects To EOEnterprise Objects [SORTED]


  • Subject: Re: Converting NSArray Objects To EOEnterprise Objects [SORTED]
  • From: "Jonathan Fleming" <email@hidden>
  • Date: Mon, 04 Aug 2003 07:58:51 +0100

From: Ricardo Strausz <email@hidden>
To: Jonathan Fleming <email@hidden>
CC: email@hidden
Subject: Re: Converting NSArray Objects To EOEnterprise Objects
Date: Fri, 1 Aug 2003 16:24:50 -0500

Jonathan... stop smoking that ;^()

LOL... I don't know what I'm doing anymore... my head is so junked up with webObjects everything I can't think.


No, really, what I was trying to do was search the database for the existence of an object; for example, an email that was registered in a preliminary registration form so that when the user returned to fill in the full registration form through the link that was automatically sent to them, the app would then search the database using EOUtilities.rawRowsMatchingKeyAndValue() method (which returns an array, but only on said table/entity), and if the object was there I was thinking I had to turn it an 'eo' which would be of entity TbAddress to be able to link it to entity TbAdminUser that was about to be created, and you need eo's for that, correct?.

Anyhow, whatever I was thinking I droped as soon as I got the perplexed replies to my post, it's then that you know you're asking something of the ridiculous.
My problem was that I didn't fully understand what the EOUtilities could do for me, I think... I needed to be able to search the tbAddress table through the tbAdminUser table's relationship to perform my check but my head wasn't taking much in at this time, I was looking at EOUtilities API for a method that would help my do it and I couldn't see but I think it was there ( objectsWithFetchSpecificationAndBindings() which returns either an array or EOEnterpriseObject which is what I thought I wanted), but seeing as you had to create a fetch spec for this EOUtility and a NSDictionary, I opted to build the fetch spec prgrammatically instead to perform my task so that the code was altogether. I ended up with what I needed but it was looking at the EOUtility which gave me the wake up call.


Another thing that was throwing me was that I've only recently got to grips with database design in terms of normalisation. In the first couple of apps that I constructed I placed such properties as an address in the same table as say the user and duplicated this in say a tbClient table, but for security reasons and also to properly normalise the database I didn't want to do that I wanted to chop it up a bit but was too daunted by the Sophistcated Database Example that WebObjects has. However, on many occasions I kept looking at it until the penny droped and I gave it a go and attempted to reconstruct my database design, which as you can imagine would take some consideration of what you might need to change in your code as well. Whats more, is I was performing these changes at the end of the project... not a good time to go fooling around, but of course I did. Thankfully it has paid off. I'm happy now 'cause I've got what I wanted to achieve all along.

Sorry for doing your heads in, but you know what they say...THERE ARE NO STUPID QUESTIONS, JUST STUPID ANSWERS ;^)
that's my cope out... and I'm sticking to it. :^)


Kind regards
Jonathan


As many here (I suppose), I realy do not undestand your question...
What do you mean by converting an array to an eo??
do you mean, implement something like eo.initWithArray(anarray)?
or an object which inherits from NSArray AND EOCustomObject?? You most know this is imppossible in Java (and ObjC)...


nem erttetem!!!

Dino

On jueves, juli 31, 2003, at 11:57 America/Mexico_City, Jonathan Fleming wrote:

Converting NSArray Objects To EOEnterprise Objects...
can this be done? If so, how is it done

Regards
Jonathan :^)

_________________________________________________________________
Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger
_______________________________________________
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.


_________________________________________________________________ On the move? Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile _______________________________________________ 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.

  • Prev by Date: Re: EO: Not propagating key values...
  • Next by Date: Re: EO: Not propagating key values...
  • Previous by thread: Re: Struggling with qualifiers involving sets
  • Next by thread: Relationships with horizontally mapped inheritance
  • Index(es):
    • Date
    • Thread