• 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: Simple insert?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple insert?


  • Subject: Re: Simple insert?
  • From: Art Isbell <email@hidden>
  • Date: Thu, 29 May 2003 16:45:42 -1000

On Thursday, May 29, 2003, at 11:42  AM, Goodbye Bill wrote:

I'm trying to follow the examples that I have from various tutorials to
create very simple membership create/login pages. One page should simply
check for the existence of the requested username and create the necessary
entry in the table. Another page should take the standard username and
password combination and be able to authenticate against that table.
Unfortunately, every example I come across shows that I should be using the
EditingContext against an array of "Member" objects at the application or
session level.


Is this really how people deal with this type of thing in WebObjects?

Depends on the app. If your app needs to access these members repeatedly, caching them in an array in the Application or Session objects reduces database accesses.


Is
there not a way to build this type of simple logic without using large
arrays to contain every member in the database?

Sure. Invoke EOUtilities.objectMatchingKeyAndValue() passing the username's attribute name as the key and the entered username as the value. If no object is returned, an EOObjectNotAvailableException will be thrown. If this exception isn't thrown, an object whose username attribute's value matches the entered username already exists.


EOUtilities implements a number of popular convenience methods, so it's a good class to learn.

Aloha,
Art
_______________________________________________
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: 
 >Simple insert? (From: Goodbye Bill <email@hidden>)

  • Prev by Date: Re: (no subject)
  • Next by Date: Many pages or one page?
  • Previous by thread: Simple insert?
  • Next by thread: Re: Simple insert?
  • Index(es):
    • Date
    • Thread