<?php

require_once 'orm/mapping/OrmMapElementCollection.php';

/**
 * One to one (o2o) relations map's element class.
 * 
 * This class defines map's element for O2o relations.
 * This element represents a o2o (usually marked as 1:1) relation.
 * 
 * @author  $Author: pruna $
 * @package orm/mapping
 * @version $Revision: 1.3 $
 * @created 02-Apr-2005
 * @modified $Date: 2005/12/06 02:56:45 $
 */
class OrmMapElementO2o extends OrmMapElementCollection {
    
    /**
     * Constructor that defines basic properties for this Bean.
     * 
     * It follows Collection rules for constructor.
     * Basic elements are: 
     * <ul>
     * <li>update: if must update (boolean - default: true)</li>
     * <li>insert: if must insert (boolean - default: true)</li>
     * <li>null: if accepts null values (boolean - default: false)</li>
     * <li>fetch: fetch mode: join or select (string - default: select)</li>
     * <li>join: type of join to do (string - default: join)</li>
     * <li>lazy: if does lazy loading (boolean - default: false)</li>
     * <li>extends: merge results in same bean (boolean - default: false)</li>
     * </ul>
     * Default values may serve as guide for preferred data types.
     * For a full description about this elements, see @docs
     * 
     * @access  public
     * @param   ICollection    $collection    Initial elements
     */
    public function __construct($collection = null) {
        parent::__construct(array(
            'column' => null,
            'update' => TRUE,
            'insert' => TRUE,
            'nullable' => FALSE,
            'fetch' => 'select',
            'join' => 'join',
            'extends' => FALSE,
        ));
        $this->setAll($collection);
    }
   
}

?>