Eager Loading RedBeanPHP 4

63 views
Skip to first unread message

Fabien Lamonarca

unread,
Apr 28, 2017, 4:13:41 AM4/28/17
to redbeanphp
Hello everyone, 

I discovered RedBean yesterday and I found it awesome ! 

There is just a little problem, RedBeanPHP lazyloading isn't Twig compatible... so I would like to solve my problem using eager loading.

I looked to use RedBeanPHP 4 Additional Plugin Pack but I read:
 "Note that some of these plugins are considered deprecated. The Cooker and the Preloader have been replaced in RedBeanPHP 4 by different mechanisms."

So my question is : What are those different mechanisms ? 

Thanks for your answers !

gabor

unread,
Apr 28, 2017, 4:25:02 AM4/28/17
to redbeanphp



For eager loading you can use findMulti() which is far more powerful (http://www.redbeanphp.com/index.php?p=/finding#find_multi).
You can use Cooker-like functionality using the import function of dispense() (http://www.redbeanphp.com/index.php?p=/import_and_export#import_using_dispense).

Hope this helps, if you have any more questions feel free to ask!

cheers
Gabor
Reply all
Reply to author
Forward
0 new messages