why modifying one to many relation in redbeanphp thrown exception?

15 views
Skip to first unread message

navid shokri

unread,
Jul 11, 2015, 12:02:52 PM7/11/15
to redbe...@googlegroups.com

i have a table named user and this table has a one to many relation to another table with name servicearea ;

when i want to change list of servicearea using this code:

 $user->ownServiceareaList = $everything ; 

i get this exception :

Fatal error: Method RedBeanPHP\OODBBean::__toString() must not throw an exception in C:\wamp\www\IranFile_webservice\redbean\rb.php on line 0

but when i retrieve $user->ownServiceareaList it work properly and return all servicearea for this user. in other hand i have another tables with filter and polygon name and they have one to many relation but this code work fine :

$filter->ownPolygonList = $everything ; 

is this a bug in red bean or one thing is wong in my code ?

gabor

unread,
Jul 11, 2015, 2:20:25 PM7/11/15
to redbe...@googlegroups.com, navid...@gmail.com

What's inside $everything ?

navid shokri

unread,
Jul 13, 2015, 1:44:29 AM7/13/15
to redbe...@googlegroups.com
hi dear gabor and  thank for your reply 

it is an array ... i want to add replace an existing array with new one . 


--
You received this message because you are subscribed to a topic in the Google Groups "redbeanphp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/redbeanorm/HS3lZEUTAmw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to redbeanorm+...@googlegroups.com.
To post to this group, send email to redbe...@googlegroups.com.
Visit this group at http://groups.google.com/group/redbeanorm.
For more options, visit https://groups.google.com/d/optout.



--
Good Luck
Navid Shokri

gabor

unread,
Jul 13, 2015, 3:20:10 AM7/13/15
to redbe...@googlegroups.com, navid...@gmail.com
Looks like the array contains something that cannot be stored, do you have a full stack trace?

Reply all
Reply to author
Forward
0 new messages