Forums / Developer / How to fetch objects by owner

How to fetch objects by owner

Author Message

Eirik Alfstad Johansen

Thursday 04 December 2003 1:31:58 am

Hi,

I saw someone asking the same question a while ago, but since he didn't get a reply, I thought I would try again.

Is it possible to fetch objects by a specific owner using the fetch function? I would be very surprised if it isn't, but after going through the function definition for the content module, I can find no such parameter to sort by. I was thinking that the attribute_filter might be able to do this, but it only seems to handle class-specific attributes.

Next, I considered the extended_attribute_filer, but since there doesn't seem to be any documentation on this parameter, I'm stuck here as well.

I could of course do a general fetch of all the objects and then sort out the ones owned by the reader while looping through them, but that seems like unnecessary overload. Also, I can't belive that fetching objects by owner isn't very common.

Thanks in advance for any insight !

Sincerely,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Bård Farstad

Thursday 04 December 2003 4:06:04 am

It's not currently supported to filter results based on the owner of the object. The fetch function would need to add a parameter for this. E.g. owner_filer, 42.

The underlying code ( persitent objects ) has ready support for this.

So, it's not supported. But not much coding needed to add support for this.

--bård

Documentation: http://ez.no/doc