• 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
Losing my mind
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Losing my mind


  • Subject: Losing my mind
  • From: Kent Harris <email@hidden>
  • Date: Wed, 17 Mar 2004 18:12:57 -0800

Most gracious list...

I swear I'm losing my mind. Direct-to-Java-Client, I'm on the client side, here's the code:

Inside an EOEnterpriseObject...

	public  UserRole userRoleByLevel( int level ) {
		EOQualifier qual = new EOKeyValueQualifier( "authLevel",
		  EOQualifier.QualifierOperatorEqual, new Integer( level ) );

		EOFetchSpecification fs = new EOFetchSpecification( "UserRole",
		  qual, null );

		NSArray userRoles =
		  editingContext().objectsWithFetchSpecification( fs );
		...

If I take "qual" out of the fetch specification (making it null) I get all rows of the table, so the problem has to be with the qualifier specification, right? I put qual into the fetch specification (as shown above) and I get no rows.

Ok, must be "authLevel" doesn't exist or is not an integer. I've checked it a billion times. I can do a manual query on the database:

mysql> select * from user_role where auth_level=0;
+------------+---------+------------+
| AUTH_LEVEL | ROLE_ID | ROLE       |
+------------+---------+------------+
|          0 |       1 | Logged Out |
+------------+---------+------------+
1 row in set (0.00 sec)

mysql> describe user_role;
+------------+----------+------+-----+---------+-------+
| Field      | Type     | Null | Key | Default | Extra |
+------------+----------+------+-----+---------+-------+
| AUTH_LEVEL | int(11)  |      |     | 0       |       |
| ROLE_ID    | int(11)  |      | PRI | 0       |       |
| ROLE       | char(64) |      |     |         |       |
+------------+----------+------+-----+---------+-------+
3 rows in set (0.00 sec)

I don't get it.

Kent
_______________________________________________
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.


  • Follow-Ups:
    • Re: Losing my mind
      • From: Art Isbell <email@hidden>
    • Re: Losing my mind
      • From: Ray Ackland <email@hidden>
  • Prev by Date: Re: Cannot get port 1085 to start up
  • Next by Date: Re: Losing my mind
  • Previous by thread: Re: State machines in WO
  • Next by thread: Re: Losing my mind
  • Index(es):
    • Date
    • Thread