Fetching Unqualified Data Vs Qaulified Data
Fetching Unqualified Data Vs Qaulified Data
- Subject: Fetching Unqualified Data Vs Qaulified Data
- From: "Jonathan Fleming" <email@hidden>
- Date: Wed, 08 Jan 2003 18:15:13 +0000
In my EOModel I have two entities, TbAdmin & TbClientAccount
TbAdmin has a toMany relationship with TbClientAccount
TbClientAccount has a toOne relationship with TbAdmin
When the user(TbAdmin) enters their administration page in the application,
they can see every row of the TbClientAccount entity rather than just their
own rows/records. I have used an unqualified fetch and in-memory sort
orderings, but here's my point; I thought that by having a oneToMany
relationship from TbAdmin to TbClientAccount an unqualified fetch would
automatically fetch only the rows belonging to that logged in user.
Since I seemingly have this wrong, I think I have to create a qualified
fetch on the adminID of the TbAdmin entity, but I do not know how to get the
ID from the entity as it is abstract. Can anyone forward a method or methods
that will enable me to provide an instance variable with the user's ID that
I can create a fetch with.
I have seen several methods refering to primaryKey in the Java Library (api)
but I am still uncertain as to which one should be used.
Or have I simply build the model wrong?
Advanced Thanks
Regards
Jonathan
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
_______________________________________________
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.