Re: setParent is missing
Kris Leite <[email protected]>
| Newsgroups | gmane.comp.java.helma.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Hannes,
>The proper way to make sure the parent is set correctly is by using the
>_parent property in type.properties.
I tried that but could not get it to work. (Maybe because I didn't
define it correctly <grin>)
Here is the situation.
I have a database file that contains over 100,000 records. To use, I
have defined a
_children collection with a limit on the maxsize. That way not all
100,000+ records
or there ID's are not loaded into memory.
When the javascript "get()" function is used on the parent node, it
retrieves the proper
record from the file using a SQL Select by relation function. The node
is created and
put into the node cache. The only problem is, it does not set the
parent. This causes the
"href' function to not to work and thus the 'shell' action will not work
properly without
the proper 'href'. It would be useful for my project to also have the
'href' working
properly.
This weekend I traced down what I believe might be the cause and
possible solution.
It appears that "getNodeByRelation" could (?or should?) set the node
parent since it is
called by 'getNode' with the parent node being passed as a parameter to
it. I added
one line of code in that routine at line 1648:
node.setParent(home);
(If you would like a patch file, I can provide one.) It seemed to solve
my problem
and now 'shell' is working properly.
It that an acceptable solution?
Thanks,
Kris
Hannes Wallnoefer wrote:
> Hi Kris,
>
> I could be wrong, but I think HopObject.setParent() is no more. The
> proper way to make sure the parent is set correctly is by using the
> _parent property in type.properties.
>
> What exactly do you need it for?
>
> hannes
>
> 2007/4/14, Kris Leite <[email protected]>:
>
>> It would appear that the hopobject function 'setParent' was not implemented.
>> It would be useful to have this function since it would appear that I am in
>> the situation where I need to limit Helma caching of subnodes.
>>
>> Is there a workaround for this issue? Or should I just develop a patch for
>> this feature?
>>
>> Thanks,
>> Kris
>>
>> _______________________________________________
>> Helma-user mailing list
>> [email protected]
>> http://helma.org/mailman/listinfo/helma-user
>>
>>
> _______________________________________________
> Helma-user mailing list
> [email protected]
> http://helma.org/mailman/listinfo/helma-user
>
>