• 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
Retrieve data from DB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Retrieve data from DB


  • Subject: Retrieve data from DB
  • From: email@hidden
  • Date: Tue, 5 Dec 2006 02:26:54 +0100

Hi *,

I'm totally new to both, WO and this list and am unfortunately about to make a rather unglamorous debut with a complete noobie question.
I've tried to google, tried to find the information in the apple-developer-docs...all to no avail. :(

Here goes:

Inside the logic of my little login algorithm i do:

EOEnterpriseObject aUser = EOUtilities.objectMatchingValues(ec, "user", bindings);

This is all working fine and i can login when the user exists and the correct password has been given.
But I also would like to check, whether or not the user logging in is a site admin or not. For that, my 'user' entity has a third attribute (besides "username" and "password") that is "admin".
Now...from what I've read I could apparently fetch all objects from my db that have "admin = 1" and then see if my username appears anywhere in that list but this seems insanely wrong since I already have the object of interest in 'aUser'!?
So my noobness boils down to this question:

How do I get the value of the column "admin" for the EOEnterpriseObject that's stored in 'aUser'?

Thank you all for your patience with noobs like me.

-MPA


P.S. any pointers to online tutorials are more than welcome! :-)
 _______________________________________________
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

  • Follow-Ups:
    • Re: Retrieve data from DB
      • From: Gilles MATHURIN <email@hidden>
    • Re: Retrieve data from DB
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: WO Won't Launch
  • Next by Date: Re: Retrieve data from DB
  • Previous by thread: Re: WO Won't Launch
  • Next by thread: Re: Retrieve data from DB
  • Index(es):
    • Date
    • Thread