Graph in redbean 4

46 views
Skip to first unread message

Masoud Amiri

unread,
May 16, 2014, 2:51:55 PM5/16/14
to redbe...@googlegroups.com
Hi Gabor,

you have stated:

"Also note that the new R::dispense() method works much like the old graph() method."

can you please explain and provide an example?

gabor

unread,
May 16, 2014, 6:28:36 PM5/16/14
to redbe...@googlegroups.com

Masoud Amiri

unread,
May 17, 2014, 6:09:30 AM5/17/14
to redbe...@googlegroups.com
Thanks. Works fine.

sah

unread,
Oct 1, 2016, 11:15:44 AM10/1/16
to redbeanphp
Hello,

I have begun to update my project from RB3 to RB4.

With RB3 I was using R::graph() a lot with enableBeanLoading, filterEmpty set to TRUE. Especially enableBeanLoading = TRUE was very useful to me,
because my HTML form just had a checkbox with an "id" of a sharedBean to establish a relation.
With the enableBeanLoading = TRUE a bean was loaded by graph and validations went on, but now with R::dispense()
such a bean (with an id set) wasn't loaded beforehand, thus the bean is empty and will fail in my validations.

In line 161 a loop starts to display all team beans as optional sharedTeam beans of the user bean.

Hope this gives a hint at what I aim at?!

I realize that I could still use Cooker as plugin in RB4, but I would like not to.

Is there a way to achieve at least enableBeanLoading with the R::dispense( $beanFromArray ) in RedBeanPHP 4?

gabor

unread,
Oct 1, 2016, 3:53:20 PM10/1/16
to redbeanphp

You can continue to use the Cooker plugin, I'll keep supporting it.

https://github.com/gabordemooij/RB4Plugins/blob/master/Cooker/Cooker.php

I will be developing a little component to replace the Cooker with minimal effort but I have no time yet.

cheers
Gabor

sah

unread,
Oct 2, 2016, 3:40:20 AM10/2/16
to redbeanphp
I will do so.

Thank you Gabor.
Reply all
Reply to author
Forward
0 new messages