samples/PhotoAlbum/lib/rb.php
private function processEmbeddedBeans($bean, $embeddedBeans) {
		foreach($embeddedBeans as $linkField=>$embeddedBean) {
			if (!$this->isFrozen) {
				$this->writer->addIndex($bean->getMeta('type'),
							'index_foreignkey_'.$bean->getMeta('type').'_'.$embeddedBean->getMeta('type'),
							 $linkField);
				$isDep = $this->isDependentOn($bean->getMeta('type'),$embeddedBean->getMeta('type'));
				$this->writer->addFK($bean->getMeta('type'),$embeddedBean->getMeta('type'),$linkField,'id',$isDep);
			}
		}
		
	}
private function processEmbeddedBeans($bean, $embeddedBeans) {
		foreach($embeddedBeans as $linkField=>$embeddedBean) {
			if (!$this->isFrozen) {
				$this->writer->addIndex($bean->getMeta('type'),
							'index_foreignkey_'.$bean->getMeta('type').'_'.$embeddedBean->getMeta('type'),
							 $linkField);
				$isDep = $this->isDependentOn($bean->getMeta('type'),$embeddedBean->getMeta('type'));
				$this->writer->addFK($bean->getMeta('type'),$embeddedBean->getMeta('type'),$linkField,'id',$isDep);
			}
		}
		
	}
private function processEmbeddedBeans ( $ bean , $ embeddedBeans ) { foreach ( $ embeddedBeans as $ linkField => $ embeddedBean ) { if ( ! $ this -> isFrozen ) { $ this -> writer -> addIndex ( $ bean -> getMeta ( 'type' ) , 'index_foreignkey_' . $ bean -> getMeta ( 'type' ) . '_' . $ embeddedBean -> getMeta ( 'type' ) , $ linkField ) ; $ isDep = $ this -> isDependentOn ( $ bean -> getMeta ( 'type' ) , $ embeddedBean -> getMeta ( 'type' ) ) ; $ this -> writer -> addFK ( $ bean -> getMeta ( 'type' ) , $ embeddedBean -> getMeta ( 'type' ) , $ linkField , 'id' , $ isDep ) ; } } }
Processes embedded beans.
Each embedded bean will be indexed and foreign keys will
be created if the bean is in the dependency list.

@param RedBean_OODBBean $bean          bean
@param array            $embeddedBeans embedded beans
Processes embedded beans . Each embedded bean will be indexed and foreign keys will be created if the bean is in the dependency list .