| Jim, If oppID is a primary or foreign key in your database then you shouldn't really be thinking about it at all. In fact it really shouldn't even be marked as a class property in your entity. Assuming that oppID is a foreign key in your customer entity, then you should have a to-one relationship in your model from Customer --> OpportunityCompany. Then you would qualify your fetch using the relationship. You could do something like: // Get the opportunity company to match against. // // There are many ways you could get this. I'm just showing how to get the company // using its primary key value to demonstrate the example you gave. // // You could get this using a popup list, say in a query form, or any number of // other ways. The point here is that you are qualifying using a reference to an // OpportunityCompany object not the actual database foreign key. try { OpportunityCompany aCompany = (OpportunityCompany)EOUtilities .objectWithPrimaryKeyValue(ec, "OpportunityCompany", new Integer(15)); // Setup the query match used to qualify your data source. selectedCustomDisplayGroup.queryMatch().takeValueForKey(aCompany, "opportunityCompany"); selectedCustomDisplayGroup.qualifyDataSource(); } catch (Exception e) { // do the necessary exception handling } -- Robert Walker There are 10 types of people in the world, those who count in binary, and those who don't. On Mar 4, 2006, at 2:46 AM, Jim Wong wrote: Hi: |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]
