AnsweredAssumed Answered

After fetch related beans and update some fields and fetch again gives old records

Question asked by Ishan shah on Mar 27, 2018
Latest reply on Mar 28, 2018 by Francesca Shiekh

in_customer_bean = BeanFactory::getBean("IN_Customers",$customer_id);

 

        if ($in_customer_bean->load_relationship('in_locations')) {

 

   

            $relatedBeans = $in_customer_bean->in_locations->getBeans();

              foreach(  $relatedBeans  as key => $value){

                  $value->name = abc;

                  $value->save();

               }
               $relatedBeans2 = $in_customer_bean->in_locations->getBeans();

// Now this beans get me old recoard not updated.

            return $relatedBeans;

        }

Outcomes