Losing my mind
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.