Forums / Developer / Fetching objects with the specified parent nodes
Eirik Alfstad Johansen
Monday 21 June 2004 7:55:55 am
Hi,
I need to fetch object based on a list of parent nodes. The object fetches should be nodes below all of the specified parent nodes. Is there any way of doing this using a simple template fetch?
I tried
parent_node_id, array(1, 2, etc.)
, but that just seems to fetch all the nodes in each parent node.
Thanks in advance !
Sincerely,
Eirik Johansenhttp://www.netmaking.no/
Sincerely, Eirik Alfstad Johansen http://www.netmaking.no/
Kåre Køhler Høvik
Monday 21 June 2004 8:10:16 am
Use <your_node_object>.object to get the content object.There is no way to fetch the child objects directly.
--Kåre Høvik
Kåre Høvik
Tuesday 22 June 2004 3:40:55 am
Hi Kåre,
I think you might have misunderstood my question. My main intent is not to fetch an object but rather to make sure that the object has all the specified parent nodes.
If I do
the result is all the child nodes of node 1, all the child nodes og node 2 and all the child nodes of etc. However, I would like to get the object which has nodes as childs of all these specified parent nodes.
Jan Borsodi
Tuesday 22 June 2004 4:34:38 am
I don't believe this is possible with the current functionality.
The only way is write your own fetch function or template operator to do this.You will also need to create your own SQLs for this.
-- Amos Documentation: http://ez.no/ez_publish/documentation FAQ: http://ez.no/ez_publish/documentation/faq
Wednesday 23 June 2004 2:45:50 am
Hi guys,
Thanks for your replies. I've now started working on an extension to accomplish this. However, I have run into a problem I can't understand.
According to my admin interface, the node with the id of 98 has the object id of 96 (displayed at the very top of the node in full view). However, when I do a search in the database for the row containing the id 98 in the table eznode_assignment, the field contentobject_id field contains the value 102 in the row returned.
Am I looking at the wrong fields, or perhaps the wrong tables?