Hello Paul,
thanks for you comments!
> Generally, the only time I need something like this is when I'm dealing with child records. If it's a parent, it's probably only a single record (filtered on the PK). There are exceptions, of course, but it's usually the case. If you need to filter/find/locate in a bizobj that returns multiple records, which field should it filter on? The PK? A foreign key? Something else? Since we don't know ahead of time, this would have to be a shell method that you would override in each bizobj subclass. I used to have different methods in my bizobjs that would query/filter/locate/find on different parameters, then I would just call that particular method with the parameters. That worked, but it was kind of a pain. Now that the framework includes generic methods to requery any view in the DE, those methods aren't really needed. I just add code to the PostInitHook() to add my view parameters, then call the bizobjs Requery() method. This accomplishes the same goal. The one advantage for a generic
>query/fiilter/locate/find is that the data is already loaded, so it might be faster than issuing a new query for a single record. But that ones really dependent on the number of records in the data, if it's indexed, etc.
A few comments from my side:
- When I only load one record at a time, what is possible and good for quite a bunch of problems there is no need for first/next/prev/last methods.
Other way around when you have these ones it would be konsequent also to have a search/locate/filter
- Filter could e.g. be a method wich I just parse in the filter condition
e.g. myfield = "Marcus" and it does Filter setting or also resseting
- Search would work in an similar way
- You could reduce the number of views or view parameters tremendously if you are able to filter. Filter only goes on a max of a 100 records, but I wouldn't need a few for every other condition I want the data to be filtered.
- I agree with you that you don't really need this too often but it would just be consequent if we could have it.
Regards
Marcus