Bugzilla – Bug 666
HopObject.size() broken
Last modified: 2009-05-27 13:59:49
You need to log in before you can comment on or make changes to this bug.
return value of size() does not change when removing children of a collection. e.g. this does not work as expected: {{{ res.debug('###pre'); res.debug('size ' + forum.size()); res.debug('children ' + forum.list()); var len = forum.size(); for (var i=len-1;i>=0;i--) { var comment = forum.get(i); comment.remove(); forum.removeChild(comment); } res.debug('###post'); res.debug('size ' + forum.size()); res.debug('children ' + forum.list()); ---------- output --------- ###pre size 3 children Comment#51006863,Comment#51006313,Comment#51005791 ###post size 3 children }}} this works as expected in the official helma 1.6.3. release.
tested with oracle 10g and mysql 5.0 i first encountered the problem with generic ref collections ($id, $prototype), but 'normal' collections (no matter the cachemode) are effected as well.
Should be fixed in svn.