Midgard Query Builder multilanged more
Posted on 2005-07-30 18:20:23 EEST.
It was very frustrating experience to try to make mgd_list_xxx functions really easily working with multilanged objects. Well, it appears that such functions can not be used with ML'ed objects in real life as what you can get ( and fetch ) are objects with some lang set and additionally "the same" objects dulicated with lang 0.
I used to use ML Midgard feature only with mgd_get_xxx functions , so midgard ML'ed fetchables became something weird.
Luckily I was able to "fix" this missed feature with Midgard Query Builder. So now , using QB all objects returned by execute method have no duplicated ( lang 0 ) ones. Additionaly you are able to limit objects and get only these ones which use particular language.Follow midgard documentation to see how set_lang method works.
Additionally QB has count method which returns number of objects returned by query.
In theory this "should be" '$qb->count()' times faster than count($qb->execute).