• 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
Beginners question... objectsMatchingKeyAndValue not working as expected
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Beginners question... objectsMatchingKeyAndValue not working as expected


  • Subject: Beginners question... objectsMatchingKeyAndValue not working as expected
  • From: Tarun Reddy <email@hidden>
  • Date: Fri, 14 Apr 2006 10:58:06 -0600

So I've been hanging out in the J2EE world for a while, all the time looking at WebObjects. Finally came up with a little self project that I thought would be nice to implement in WebObjects, so I'm jumping in.

However I'm currently having an issue with retrieving objects from the database. Here is a sample sniplet that shows what I'm trying to do:

// allow user to log in
Session session = (Session)session();
EOEditingContext ec = session.defaultEditingContext();
System.out.println(login);
NSArray users = EOUtilities.objectsMatchingKeyAndValue(ec, "VaultUser", "login", login);
// NSArray users = EOUtilities.objectsForEntityNamed(ec, "VaultUser");




Now, the second commented line works, but the first doesn't even though I have a row in the database where the login column is equal to the value that "login" is.

Any ideas? I'm stumped. (BTW, I actually took this code from one of Apple's demo applications, iShack, I think)

Thanks,
Tarun
_______________________________________________
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: Beginners question... objectsMatchingKeyAndValue not working as expected
      • From: Ken Anderson <email@hidden>
  • Prev by Date: WOBuilder 5.3.1
  • Next by Date: Re: Beginners question... objectsMatchingKeyAndValue not working as expected
  • Previous by thread: Re: WOBuilder 5.3.1
  • Next by thread: Re: Beginners question... objectsMatchingKeyAndValue not working as expected
  • Index(es):
    • Date
    • Thread