[Alba-desarrollo] SVN Alba r4942 - in prosistem/alba/trunk/alba: apps/principal/modules/relAnioActividad/actions apps/principal/modules/relAnioActividad/config apps/principal/modules/relAnioActividad/templates config data/sql lib/model/map lib/model/om

commits en pressenter.com.ar commits en pressenter.com.ar
Mie Ago 8 21:37:52 CEST 2007


Author: josx
Date: 2007-08-08 16:37:43 -0300 (Wed, 08 Aug 2007)
New Revision: 4942

Modified:
   prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/actions/actions.class.php
   prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/config/generator.yml
   prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/templates/_edit_form.php
   prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/templates/_list_td_tabular.php
   prosistem/alba/trunk/alba/config/schema.yml
   prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql
   prosistem/alba/trunk/alba/data/sql/lib.model.schema.sql
   prosistem/alba/trunk/alba/lib/model/map/RelAnioActividadMapBuilder.php
   prosistem/alba/trunk/alba/lib/model/om/BaseActividad.php
   prosistem/alba/trunk/alba/lib/model/om/BaseAnio.php
   prosistem/alba/trunk/alba/lib/model/om/BaseOrientacion.php
   prosistem/alba/trunk/alba/lib/model/om/BaseRelAnioActividad.php
   prosistem/alba/trunk/alba/lib/model/om/BaseRelAnioActividadPeer.php
Log:
Agregue campo orientacion a el listado de actividades por a?\195?\177o. Tambien se modificaron los filtros de ese modulo. 

Modified: prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/actions/actions.class.php	2007-08-08 19:21:49 UTC (rev 4941)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/actions/actions.class.php	2007-08-08 19:37:43 UTC (rev 4942)
@@ -53,7 +53,11 @@
         if (isset($rel_anio_actividad['fk_actividad_id'])) {
             $this->rel_anio_actividad->setFkActividadId($rel_anio_actividad['fk_actividad_id'] ? $rel_anio_actividad['fk_actividad_id'] : null);
         }
-        
+
+        if (isset($rel_anio_actividad['fk_orientacion_id'])) {
+            $this->rel_anio_actividad->setFkOrientacionId($rel_anio_actividad['fk_orientacion_id'] ? $rel_anio_actividad['fk_orientacion_id'] : null);
+        }
+
         if (isset($rel_anio_actividad['horas'])) {
             $this->rel_anio_actividad->setHoras($rel_anio_actividad['horas']);
         }

Modified: prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/config/generator.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/config/generator.yml	2007-08-08 19:21:49 UTC (rev 4941)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/config/generator.yml	2007-08-08 19:37:43 UTC (rev 4942)
@@ -8,17 +8,19 @@
         anio: { name: Año }
         fk_actividad_id: { name: Actividad }
         horas: { name: Horas Semanales }
+        fk_orientacion_id: { name: Orientación }
     edit:
         title: Editar Actividades del Año
         fields:
             fk_anio_id:   { params: include_custom=>>Seleccione un A&ntilde;o<< }
             fk_actividad_id:   { params: include_custom=>>Seleccione una Actividad<< }
-        display: [ fk_anio_id, fk_actividad_id, horas ]
+            fk_orientacion_id:   { params: include_custom=>>Seleccione una Orientaci&oacute;n<< }
+        display: [ fk_anio_id, fk_actividad_id, fk_orientacion_id, horas ]
     list:
         title: Listado de Actividades por A&ntilde;o
-        display: [ anio, actividad, horas ]
+        display: [anio, actividad, orientacion, horas]
         object_actions:
             _edit:      -
             _delete:    -
-        filters: [ fk_anio_id ]
+        filters: [ fk_anio_id, fk_actividad_id, fk_orientacion_id ]
 

Modified: prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/templates/_edit_form.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/templates/_edit_form.php	2007-08-08 19:21:49 UTC (rev 4941)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/templates/_edit_form.php	2007-08-08 19:37:43 UTC (rev 4942)
@@ -43,7 +43,23 @@
     </div>
 </div>
 
+<div class="form-row">
+  <?php echo label_for('rel_anio_actividad[fk_orientacion_id]', __($labels['rel_anio_actividad{fk_orientacion_id}']), 'class="required" ') ?>
+  <div class="content<?php if ($sf_request->hasError('rel_anio_actividad{fk_orientacion_id}')): ?> form-error<?php endif; ?>">
+  <?php if ($sf_request->hasError('rel_anio_actividad{fk_orientacion_id}')): ?>
+    <?php echo form_error('rel_anio_actividad{fk_orientacion_id}', array('class' => 'form-error-msg')) ?>
+  <?php endif; ?>
 
+  <?php $value = object_select_tag($rel_anio_actividad, 'getFkOrientacionId', array (
+  'related_class' => 'Orientacion',
+  'control_name' => 'rel_anio_actividad[fk_orientacion_id]',
+  'include_custom' => '>>Seleccione una Orientacion<<',
+)); echo $value ? $value : '&nbsp;' ?>
+    </div>
+</div>
+
+
+
 <div class="form-row">
   <?php echo label_for('rel_anio_actividad[horas]', __($labels['rel_anio_actividad{horas}']), 'class="required" ') ?>
   <div class="content<?php if ($sf_request->hasError('rel_anio_actividad{horas}')): ?> form-error<?php endif; ?>">

Modified: prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/templates/_list_td_tabular.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/templates/_list_td_tabular.php	2007-08-08 19:21:49 UTC (rev 4941)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relAnioActividad/templates/_list_td_tabular.php	2007-08-08 19:37:43 UTC (rev 4942)
@@ -4,4 +4,5 @@
 ?>
     <td><?php echo $rel_anio_actividad->getAnio() ?></td>
       <td><?php echo $rel_anio_actividad->getActividad() ?></td>
+      <td><?php echo $rel_anio_actividad->getOrientacion() ?></td>      
       <td><?php echo $rel_anio_actividad->getHoras() ?></td>

Modified: prosistem/alba/trunk/alba/config/schema.yml
===================================================================
--- prosistem/alba/trunk/alba/config/schema.yml	2007-08-08 19:21:49 UTC (rev 4941)
+++ prosistem/alba/trunk/alba/config/schema.yml	2007-08-08 19:37:43 UTC (rev 4942)
@@ -1392,6 +1392,12 @@
       default: 0
       foreignTable: actividad
       foreignReference: id
+    fk_orientacion_id: 
+      type: integer
+      size: 11
+      required: false
+      foreignTable: orientacion
+      foreignReference: id
     horas: 
       type: decimal
       size: 10,2

Modified: prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql	2007-08-08 19:21:49 UTC (rev 4941)
+++ prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql	2007-08-08 19:37:43 UTC (rev 4942)
@@ -100,6 +100,10 @@
 ALTER TABLE `division` ADD `fk_orientacion_id` INT;
 ALTER TABLE `division` ADD CONSTRAINT `orientacion_FK_4` FOREIGN KEY (`fk_orientacion_id`) REFERENCES `orientacion` (`id`);
 
+ALTER TABLE `rel_anio_actividad` ADD `fk_orientacion_id` INT;
+ALTER TABLE `rel_anio_actividad` ADD CONSTRAINT `orientacion_FK_4` FOREIGN KEY (`fk_orientacion_id`) REFERENCES `orientacion` (`id`);
+
+
 SET FOREIGN_KEY_CHECKS = 1;
 
 

Modified: prosistem/alba/trunk/alba/data/sql/lib.model.schema.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/lib.model.schema.sql	2007-08-08 19:21:49 UTC (rev 4941)
+++ prosistem/alba/trunk/alba/data/sql/lib.model.schema.sql	2007-08-08 19:37:43 UTC (rev 4942)
@@ -1080,6 +1080,7 @@
 	`id` INTEGER(11)  NOT NULL AUTO_INCREMENT,
 	`fk_anio_id` INTEGER(11) default 0 NOT NULL,
 	`fk_actividad_id` INTEGER(11) default 0 NOT NULL,
+	`fk_orientacion_id` INTEGER(11),
 	`horas` DECIMAL(10,2) default 0 NOT NULL,
 	PRIMARY KEY (`id`),
 	INDEX `rel_anio_actividad_FI_1` (`fk_anio_id`),
@@ -1089,7 +1090,11 @@
 	INDEX `rel_anio_actividad_FI_2` (`fk_actividad_id`),
 	CONSTRAINT `rel_anio_actividad_FK_2`
 		FOREIGN KEY (`fk_actividad_id`)
-		REFERENCES `actividad` (`id`)
+		REFERENCES `actividad` (`id`),
+	INDEX `rel_anio_actividad_FI_3` (`fk_orientacion_id`),
+	CONSTRAINT `rel_anio_actividad_FK_3`
+		FOREIGN KEY (`fk_orientacion_id`)
+		REFERENCES `orientacion` (`id`)
 )Type=InnoDB;
 
 #-----------------------------------------------------------------------------

Modified: prosistem/alba/trunk/alba/lib/model/map/RelAnioActividadMapBuilder.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/map/RelAnioActividadMapBuilder.php	2007-08-08 19:21:49 UTC (rev 4941)
+++ prosistem/alba/trunk/alba/lib/model/map/RelAnioActividadMapBuilder.php	2007-08-08 19:37:43 UTC (rev 4942)
@@ -38,6 +38,8 @@
 
 		$tMap->addForeignKey('FK_ACTIVIDAD_ID', 'FkActividadId', 'int', CreoleTypes::INTEGER, 'actividad', 'ID', true, 11);
 
+		$tMap->addForeignKey('FK_ORIENTACION_ID', 'FkOrientacionId', 'int', CreoleTypes::INTEGER, 'orientacion', 'ID', false, 11);
+
 		$tMap->addColumn('HORAS', 'Horas', 'double', CreoleTypes::DECIMAL, true, 10,2);
 
 	} 

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseActividad.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseActividad.php	2007-08-08 19:21:49 UTC (rev 4941)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseActividad.php	2007-08-08 19:37:43 UTC (rev 4942)
@@ -1036,7 +1036,42 @@
 		return $this->collRelAnioActividads;
 	}
 
+
 	
+	public function getRelAnioActividadsJoinOrientacion($criteria = null, $con = null)
+	{
+				include_once 'lib/model/om/BaseRelAnioActividadPeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		if ($this->collRelAnioActividads === null) {
+			if ($this->isNew()) {
+				$this->collRelAnioActividads = array();
+			} else {
+
+				$criteria->add(RelAnioActividadPeer::FK_ACTIVIDAD_ID, $this->getId());
+
+				$this->collRelAnioActividads = RelAnioActividadPeer::doSelectJoinOrientacion($criteria, $con);
+			}
+		} else {
+									
+			$criteria->add(RelAnioActividadPeer::FK_ACTIVIDAD_ID, $this->getId());
+
+			if (!isset($this->lastRelAnioActividadCriteria) || !$this->lastRelAnioActividadCriteria->equals($criteria)) {
+				$this->collRelAnioActividads = RelAnioActividadPeer::doSelectJoinOrientacion($criteria, $con);
+			}
+		}
+		$this->lastRelAnioActividadCriteria = $criteria;
+
+		return $this->collRelAnioActividads;
+	}
+
+	
 	public function initRelDivisionActividadDocentes()
 	{
 		if ($this->collRelDivisionActividadDocentes === null) {

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseAnio.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseAnio.php	2007-08-08 19:21:49 UTC (rev 4941)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseAnio.php	2007-08-08 19:37:43 UTC (rev 4942)
@@ -710,4 +710,39 @@
 		return $this->collRelAnioActividads;
 	}
 
+
+	
+	public function getRelAnioActividadsJoinOrientacion($criteria = null, $con = null)
+	{
+				include_once 'lib/model/om/BaseRelAnioActividadPeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		if ($this->collRelAnioActividads === null) {
+			if ($this->isNew()) {
+				$this->collRelAnioActividads = array();
+			} else {
+
+				$criteria->add(RelAnioActividadPeer::FK_ANIO_ID, $this->getId());
+
+				$this->collRelAnioActividads = RelAnioActividadPeer::doSelectJoinOrientacion($criteria, $con);
+			}
+		} else {
+									
+			$criteria->add(RelAnioActividadPeer::FK_ANIO_ID, $this->getId());
+
+			if (!isset($this->lastRelAnioActividadCriteria) || !$this->lastRelAnioActividadCriteria->equals($criteria)) {
+				$this->collRelAnioActividads = RelAnioActividadPeer::doSelectJoinOrientacion($criteria, $con);
+			}
+		}
+		$this->lastRelAnioActividadCriteria = $criteria;
+
+		return $this->collRelAnioActividads;
+	}
+
 } 
\ No newline at end of file

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseOrientacion.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseOrientacion.php	2007-08-08 19:21:49 UTC (rev 4941)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseOrientacion.php	2007-08-08 19:37:43 UTC (rev 4942)
@@ -26,6 +26,12 @@
 	protected $lastDivisionCriteria = null;
 
 	
+	protected $collRelAnioActividads;
+
+	
+	protected $lastRelAnioActividadCriteria = null;
+
+	
 	protected $alreadyInSave = false;
 
 	
@@ -185,6 +191,14 @@
 				}
 			}
 
+			if ($this->collRelAnioActividads !== null) {
+				foreach($this->collRelAnioActividads as $referrerFK) {
+					if (!$referrerFK->isDeleted()) {
+						$affectedRows += $referrerFK->save($con);
+					}
+				}
+			}
+
 			$this->alreadyInSave = false;
 		}
 		return $affectedRows;
@@ -234,7 +248,15 @@
 					}
 				}
 
+				if ($this->collRelAnioActividads !== null) {
+					foreach($this->collRelAnioActividads as $referrerFK) {
+						if (!$referrerFK->validate($columns)) {
+							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+						}
+					}
+				}
 
+
 			$this->alreadyInValidation = false;
 		}
 
@@ -360,6 +382,10 @@
 				$copyObj->addDivision($relObj->copy($deepCopy));
 			}
 
+			foreach($this->getRelAnioActividads() as $relObj) {
+				$copyObj->addRelAnioActividad($relObj->copy($deepCopy));
+			}
+
 		} 
 
 		$copyObj->setNew(true);
@@ -525,4 +551,144 @@
 		return $this->collDivisions;
 	}
 
+	
+	public function initRelAnioActividads()
+	{
+		if ($this->collRelAnioActividads === null) {
+			$this->collRelAnioActividads = array();
+		}
+	}
+
+	
+	public function getRelAnioActividads($criteria = null, $con = null)
+	{
+				include_once 'lib/model/om/BaseRelAnioActividadPeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		if ($this->collRelAnioActividads === null) {
+			if ($this->isNew()) {
+			   $this->collRelAnioActividads = array();
+			} else {
+
+				$criteria->add(RelAnioActividadPeer::FK_ORIENTACION_ID, $this->getId());
+
+				RelAnioActividadPeer::addSelectColumns($criteria);
+				$this->collRelAnioActividads = RelAnioActividadPeer::doSelect($criteria, $con);
+			}
+		} else {
+						if (!$this->isNew()) {
+												
+
+				$criteria->add(RelAnioActividadPeer::FK_ORIENTACION_ID, $this->getId());
+
+				RelAnioActividadPeer::addSelectColumns($criteria);
+				if (!isset($this->lastRelAnioActividadCriteria) || !$this->lastRelAnioActividadCriteria->equals($criteria)) {
+					$this->collRelAnioActividads = RelAnioActividadPeer::doSelect($criteria, $con);
+				}
+			}
+		}
+		$this->lastRelAnioActividadCriteria = $criteria;
+		return $this->collRelAnioActividads;
+	}
+
+	
+	public function countRelAnioActividads($criteria = null, $distinct = false, $con = null)
+	{
+				include_once 'lib/model/om/BaseRelAnioActividadPeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		$criteria->add(RelAnioActividadPeer::FK_ORIENTACION_ID, $this->getId());
+
+		return RelAnioActividadPeer::doCount($criteria, $distinct, $con);
+	}
+
+	
+	public function addRelAnioActividad(RelAnioActividad $l)
+	{
+		$this->collRelAnioActividads[] = $l;
+		$l->setOrientacion($this);
+	}
+
+
+	
+	public function getRelAnioActividadsJoinAnio($criteria = null, $con = null)
+	{
+				include_once 'lib/model/om/BaseRelAnioActividadPeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		if ($this->collRelAnioActividads === null) {
+			if ($this->isNew()) {
+				$this->collRelAnioActividads = array();
+			} else {
+
+				$criteria->add(RelAnioActividadPeer::FK_ORIENTACION_ID, $this->getId());
+
+				$this->collRelAnioActividads = RelAnioActividadPeer::doSelectJoinAnio($criteria, $con);
+			}
+		} else {
+									
+			$criteria->add(RelAnioActividadPeer::FK_ORIENTACION_ID, $this->getId());
+
+			if (!isset($this->lastRelAnioActividadCriteria) || !$this->lastRelAnioActividadCriteria->equals($criteria)) {
+				$this->collRelAnioActividads = RelAnioActividadPeer::doSelectJoinAnio($criteria, $con);
+			}
+		}
+		$this->lastRelAnioActividadCriteria = $criteria;
+
+		return $this->collRelAnioActividads;
+	}
+
+
+	
+	public function getRelAnioActividadsJoinActividad($criteria = null, $con = null)
+	{
+				include_once 'lib/model/om/BaseRelAnioActividadPeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		if ($this->collRelAnioActividads === null) {
+			if ($this->isNew()) {
+				$this->collRelAnioActividads = array();
+			} else {
+
+				$criteria->add(RelAnioActividadPeer::FK_ORIENTACION_ID, $this->getId());
+
+				$this->collRelAnioActividads = RelAnioActividadPeer::doSelectJoinActividad($criteria, $con);
+			}
+		} else {
+									
+			$criteria->add(RelAnioActividadPeer::FK_ORIENTACION_ID, $this->getId());
+
+			if (!isset($this->lastRelAnioActividadCriteria) || !$this->lastRelAnioActividadCriteria->equals($criteria)) {
+				$this->collRelAnioActividads = RelAnioActividadPeer::doSelectJoinActividad($criteria, $con);
+			}
+		}
+		$this->lastRelAnioActividadCriteria = $criteria;
+
+		return $this->collRelAnioActividads;
+	}
+
 } 
\ No newline at end of file

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseRelAnioActividad.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseRelAnioActividad.php	2007-08-08 19:21:49 UTC (rev 4941)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseRelAnioActividad.php	2007-08-08 19:37:43 UTC (rev 4942)
@@ -21,6 +21,10 @@
 
 
 	
+	protected $fk_orientacion_id;
+
+
+	
 	protected $horas = 0;
 
 	
@@ -30,6 +34,9 @@
 	protected $aActividad;
 
 	
+	protected $aOrientacion;
+
+	
 	protected $alreadyInSave = false;
 
 	
@@ -57,6 +64,13 @@
 	}
 
 	
+	public function getFkOrientacionId()
+	{
+
+		return $this->fk_orientacion_id;
+	}
+
+	
 	public function getHoras()
 	{
 
@@ -114,6 +128,24 @@
 
 	} 
 	
+	public function setFkOrientacionId($v)
+	{
+
+						if ($v !== null && !is_int($v) && is_numeric($v)) {
+			$v = (int) $v;
+		}
+
+		if ($this->fk_orientacion_id !== $v) {
+			$this->fk_orientacion_id = $v;
+			$this->modifiedColumns[] = RelAnioActividadPeer::FK_ORIENTACION_ID;
+		}
+
+		if ($this->aOrientacion !== null && $this->aOrientacion->getId() !== $v) {
+			$this->aOrientacion = null;
+		}
+
+	} 
+	
 	public function setHoras($v)
 	{
 
@@ -134,13 +166,15 @@
 
 			$this->fk_actividad_id = $rs->getInt($startcol + 2);
 
-			$this->horas = $rs->getFloat($startcol + 3);
+			$this->fk_orientacion_id = $rs->getInt($startcol + 3);
 
+			$this->horas = $rs->getFloat($startcol + 4);
+
 			$this->resetModified();
 
 			$this->setNew(false);
 
-						return $startcol + 4; 
+						return $startcol + 5; 
 		} catch (Exception $e) {
 			throw new PropelException("Error populating RelAnioActividad object", $e);
 		}
@@ -212,7 +246,14 @@
 				$this->setActividad($this->aActividad);
 			}
 
+			if ($this->aOrientacion !== null) {
+				if ($this->aOrientacion->isModified()) {
+					$affectedRows += $this->aOrientacion->save($con);
+				}
+				$this->setOrientacion($this->aOrientacion);
+			}
 
+
 						if ($this->isModified()) {
 				if ($this->isNew()) {
 					$pk = RelAnioActividadPeer::doInsert($this, $con);
@@ -273,7 +314,13 @@
 				}
 			}
 
+			if ($this->aOrientacion !== null) {
+				if (!$this->aOrientacion->validate($columns)) {
+					$failureMap = array_merge($failureMap, $this->aOrientacion->getValidationFailures());
+				}
+			}
 
+
 			if (($retval = RelAnioActividadPeer::doValidate($this, $columns)) !== true) {
 				$failureMap = array_merge($failureMap, $retval);
 			}
@@ -307,6 +354,9 @@
 				return $this->getFkActividadId();
 				break;
 			case 3:
+				return $this->getFkOrientacionId();
+				break;
+			case 4:
 				return $this->getHoras();
 				break;
 			default:
@@ -322,7 +372,8 @@
 			$keys[0] => $this->getId(),
 			$keys[1] => $this->getFkAnioId(),
 			$keys[2] => $this->getFkActividadId(),
-			$keys[3] => $this->getHoras(),
+			$keys[3] => $this->getFkOrientacionId(),
+			$keys[4] => $this->getHoras(),
 		);
 		return $result;
 	}
@@ -348,6 +399,9 @@
 				$this->setFkActividadId($value);
 				break;
 			case 3:
+				$this->setFkOrientacionId($value);
+				break;
+			case 4:
 				$this->setHoras($value);
 				break;
 		} 	}
@@ -360,7 +414,8 @@
 		if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
 		if (array_key_exists($keys[1], $arr)) $this->setFkAnioId($arr[$keys[1]]);
 		if (array_key_exists($keys[2], $arr)) $this->setFkActividadId($arr[$keys[2]]);
-		if (array_key_exists($keys[3], $arr)) $this->setHoras($arr[$keys[3]]);
+		if (array_key_exists($keys[3], $arr)) $this->setFkOrientacionId($arr[$keys[3]]);
+		if (array_key_exists($keys[4], $arr)) $this->setHoras($arr[$keys[4]]);
 	}
 
 	
@@ -371,6 +426,7 @@
 		if ($this->isColumnModified(RelAnioActividadPeer::ID)) $criteria->add(RelAnioActividadPeer::ID, $this->id);
 		if ($this->isColumnModified(RelAnioActividadPeer::FK_ANIO_ID)) $criteria->add(RelAnioActividadPeer::FK_ANIO_ID, $this->fk_anio_id);
 		if ($this->isColumnModified(RelAnioActividadPeer::FK_ACTIVIDAD_ID)) $criteria->add(RelAnioActividadPeer::FK_ACTIVIDAD_ID, $this->fk_actividad_id);
+		if ($this->isColumnModified(RelAnioActividadPeer::FK_ORIENTACION_ID)) $criteria->add(RelAnioActividadPeer::FK_ORIENTACION_ID, $this->fk_orientacion_id);
 		if ($this->isColumnModified(RelAnioActividadPeer::HORAS)) $criteria->add(RelAnioActividadPeer::HORAS, $this->horas);
 
 		return $criteria;
@@ -406,6 +462,8 @@
 
 		$copyObj->setFkActividadId($this->fk_actividad_id);
 
+		$copyObj->setFkOrientacionId($this->fk_orientacion_id);
+
 		$copyObj->setHoras($this->horas);
 
 
@@ -492,4 +550,34 @@
 		return $this->aActividad;
 	}
 
+	
+	public function setOrientacion($v)
+	{
+
+
+		if ($v === null) {
+			$this->setFkOrientacionId(NULL);
+		} else {
+			$this->setFkOrientacionId($v->getId());
+		}
+
+
+		$this->aOrientacion = $v;
+	}
+
+
+	
+	public function getOrientacion($con = null)
+	{
+				include_once 'lib/model/om/BaseOrientacionPeer.php';
+
+		if ($this->aOrientacion === null && ($this->fk_orientacion_id !== null)) {
+
+			$this->aOrientacion = OrientacionPeer::retrieveByPK($this->fk_orientacion_id, $con);
+
+			
+		}
+		return $this->aOrientacion;
+	}
+
 } 
\ No newline at end of file

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseRelAnioActividadPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseRelAnioActividadPeer.php	2007-08-08 19:21:49 UTC (rev 4941)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseRelAnioActividadPeer.php	2007-08-08 19:37:43 UTC (rev 4942)
@@ -13,7 +13,7 @@
 	const CLASS_DEFAULT = 'lib.model.RelAnioActividad';
 
 	
-	const NUM_COLUMNS = 4;
+	const NUM_COLUMNS = 5;
 
 	
 	const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -29,6 +29,9 @@
 	const FK_ACTIVIDAD_ID = 'rel_anio_actividad.FK_ACTIVIDAD_ID';
 
 	
+	const FK_ORIENTACION_ID = 'rel_anio_actividad.FK_ORIENTACION_ID';
+
+	
 	const HORAS = 'rel_anio_actividad.HORAS';
 
 	
@@ -37,18 +40,18 @@
 
 	
 	private static $fieldNames = array (
-		BasePeer::TYPE_PHPNAME => array ('Id', 'FkAnioId', 'FkActividadId', 'Horas', ),
-		BasePeer::TYPE_COLNAME => array (RelAnioActividadPeer::ID, RelAnioActividadPeer::FK_ANIO_ID, RelAnioActividadPeer::FK_ACTIVIDAD_ID, RelAnioActividadPeer::HORAS, ),
-		BasePeer::TYPE_FIELDNAME => array ('id', 'fk_anio_id', 'fk_actividad_id', 'horas', ),
-		BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
+		BasePeer::TYPE_PHPNAME => array ('Id', 'FkAnioId', 'FkActividadId', 'FkOrientacionId', 'Horas', ),
+		BasePeer::TYPE_COLNAME => array (RelAnioActividadPeer::ID, RelAnioActividadPeer::FK_ANIO_ID, RelAnioActividadPeer::FK_ACTIVIDAD_ID, RelAnioActividadPeer::FK_ORIENTACION_ID, RelAnioActividadPeer::HORAS, ),
+		BasePeer::TYPE_FIELDNAME => array ('id', 'fk_anio_id', 'fk_actividad_id', 'fk_orientacion_id', 'horas', ),
+		BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
 	);
 
 	
 	private static $fieldKeys = array (
-		BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'FkAnioId' => 1, 'FkActividadId' => 2, 'Horas' => 3, ),
-		BasePeer::TYPE_COLNAME => array (RelAnioActividadPeer::ID => 0, RelAnioActividadPeer::FK_ANIO_ID => 1, RelAnioActividadPeer::FK_ACTIVIDAD_ID => 2, RelAnioActividadPeer::HORAS => 3, ),
-		BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'fk_anio_id' => 1, 'fk_actividad_id' => 2, 'horas' => 3, ),
-		BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
+		BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'FkAnioId' => 1, 'FkActividadId' => 2, 'FkOrientacionId' => 3, 'Horas' => 4, ),
+		BasePeer::TYPE_COLNAME => array (RelAnioActividadPeer::ID => 0, RelAnioActividadPeer::FK_ANIO_ID => 1, RelAnioActividadPeer::FK_ACTIVIDAD_ID => 2, RelAnioActividadPeer::FK_ORIENTACION_ID => 3, RelAnioActividadPeer::HORAS => 4, ),
+		BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'fk_anio_id' => 1, 'fk_actividad_id' => 2, 'fk_orientacion_id' => 3, 'horas' => 4, ),
+		BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
 	);
 
 	
@@ -108,6 +111,8 @@
 
 		$criteria->addSelectColumn(RelAnioActividadPeer::FK_ACTIVIDAD_ID);
 
+		$criteria->addSelectColumn(RelAnioActividadPeer::FK_ORIENTACION_ID);
+
 		$criteria->addSelectColumn(RelAnioActividadPeer::HORAS);
 
 	}
@@ -245,6 +250,34 @@
 
 
 	
+	public static function doCountJoinOrientacion(Criteria $criteria, $distinct = false, $con = null)
+	{
+				$criteria = clone $criteria;
+
+				$criteria->clearSelectColumns()->clearOrderByColumns();
+		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+			$criteria->addSelectColumn(RelAnioActividadPeer::COUNT_DISTINCT);
+		} else {
+			$criteria->addSelectColumn(RelAnioActividadPeer::COUNT);
+		}
+
+				foreach($criteria->getGroupByColumns() as $column)
+		{
+			$criteria->addSelectColumn($column);
+		}
+
+		$criteria->addJoin(RelAnioActividadPeer::FK_ORIENTACION_ID, OrientacionPeer::ID);
+
+		$rs = RelAnioActividadPeer::doSelectRS($criteria, $con);
+		if ($rs->next()) {
+			return $rs->getInt(1);
+		} else {
+						return 0;
+		}
+	}
+
+
+	
 	public static function doSelectJoinAnio(Criteria $c, $con = null)
 	{
 		$c = clone $c;
@@ -339,6 +372,53 @@
 
 
 	
+	public static function doSelectJoinOrientacion(Criteria $c, $con = null)
+	{
+		$c = clone $c;
+
+				if ($c->getDbName() == Propel::getDefaultDB()) {
+			$c->setDbName(self::DATABASE_NAME);
+		}
+
+		RelAnioActividadPeer::addSelectColumns($c);
+		$startcol = (RelAnioActividadPeer::NUM_COLUMNS - RelAnioActividadPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+		OrientacionPeer::addSelectColumns($c);
+
+		$c->addJoin(RelAnioActividadPeer::FK_ORIENTACION_ID, OrientacionPeer::ID);
+		$rs = BasePeer::doSelect($c, $con);
+		$results = array();
+
+		while($rs->next()) {
+
+			$omClass = RelAnioActividadPeer::getOMClass();
+
+			$cls = Propel::import($omClass);
+			$obj1 = new $cls();
+			$obj1->hydrate($rs);
+
+			$omClass = OrientacionPeer::getOMClass();
+
+			$cls = Propel::import($omClass);
+			$obj2 = new $cls();
+			$obj2->hydrate($rs, $startcol);
+
+			$newObject = true;
+			foreach($results as $temp_obj1) {
+				$temp_obj2 = $temp_obj1->getOrientacion(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+					$newObject = false;
+										$temp_obj2->addRelAnioActividad($obj1); 					break;
+				}
+			}
+			if ($newObject) {
+				$obj2->initRelAnioActividads();
+				$obj2->addRelAnioActividad($obj1); 			}
+			$results[] = $obj1;
+		}
+		return $results;
+	}
+
+
+	
 	public static function doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
 	{
 		$criteria = clone $criteria;
@@ -359,6 +439,8 @@
 
 		$criteria->addJoin(RelAnioActividadPeer::FK_ACTIVIDAD_ID, ActividadPeer::ID);
 
+		$criteria->addJoin(RelAnioActividadPeer::FK_ORIENTACION_ID, OrientacionPeer::ID);
+
 		$rs = RelAnioActividadPeer::doSelectRS($criteria, $con);
 		if ($rs->next()) {
 			return $rs->getInt(1);
@@ -386,10 +468,15 @@
 		ActividadPeer::addSelectColumns($c);
 		$startcol4 = $startcol3 + ActividadPeer::NUM_COLUMNS;
 
+		OrientacionPeer::addSelectColumns($c);
+		$startcol5 = $startcol4 + OrientacionPeer::NUM_COLUMNS;
+
 		$c->addJoin(RelAnioActividadPeer::FK_ANIO_ID, AnioPeer::ID);
 
 		$c->addJoin(RelAnioActividadPeer::FK_ACTIVIDAD_ID, ActividadPeer::ID);
 
+		$c->addJoin(RelAnioActividadPeer::FK_ORIENTACION_ID, OrientacionPeer::ID);
+
 		$rs = BasePeer::doSelect($c, $con);
 		$results = array();
 
@@ -448,6 +535,29 @@
 				$obj3->addRelAnioActividad($obj1);
 			}
 
+
+					
+			$omClass = OrientacionPeer::getOMClass();
+
+
+			$cls = Propel::import($omClass);
+			$obj4 = new $cls();
+			$obj4->hydrate($rs, $startcol4);
+
+			$newObject = true;
+			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+				$temp_obj1 = $results[$j];
+				$temp_obj4 = $temp_obj1->getOrientacion(); 				if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
+					$newObject = false;
+					$temp_obj4->addRelAnioActividad($obj1); 					break;
+				}
+			}
+
+			if ($newObject) {
+				$obj4->initRelAnioActividads();
+				$obj4->addRelAnioActividad($obj1);
+			}
+
 			$results[] = $obj1;
 		}
 		return $results;
@@ -473,6 +583,8 @@
 
 		$criteria->addJoin(RelAnioActividadPeer::FK_ACTIVIDAD_ID, ActividadPeer::ID);
 
+		$criteria->addJoin(RelAnioActividadPeer::FK_ORIENTACION_ID, OrientacionPeer::ID);
+
 		$rs = RelAnioActividadPeer::doSelectRS($criteria, $con);
 		if ($rs->next()) {
 			return $rs->getInt(1);
@@ -501,6 +613,8 @@
 
 		$criteria->addJoin(RelAnioActividadPeer::FK_ANIO_ID, AnioPeer::ID);
 
+		$criteria->addJoin(RelAnioActividadPeer::FK_ORIENTACION_ID, OrientacionPeer::ID);
+
 		$rs = RelAnioActividadPeer::doSelectRS($criteria, $con);
 		if ($rs->next()) {
 			return $rs->getInt(1);
@@ -511,6 +625,36 @@
 
 
 	
+	public static function doCountJoinAllExceptOrientacion(Criteria $criteria, $distinct = false, $con = null)
+	{
+				$criteria = clone $criteria;
+
+				$criteria->clearSelectColumns()->clearOrderByColumns();
+		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+			$criteria->addSelectColumn(RelAnioActividadPeer::COUNT_DISTINCT);
+		} else {
+			$criteria->addSelectColumn(RelAnioActividadPeer::COUNT);
+		}
+
+				foreach($criteria->getGroupByColumns() as $column)
+		{
+			$criteria->addSelectColumn($column);
+		}
+
+		$criteria->addJoin(RelAnioActividadPeer::FK_ANIO_ID, AnioPeer::ID);
+
+		$criteria->addJoin(RelAnioActividadPeer::FK_ACTIVIDAD_ID, ActividadPeer::ID);
+
+		$rs = RelAnioActividadPeer::doSelectRS($criteria, $con);
+		if ($rs->next()) {
+			return $rs->getInt(1);
+		} else {
+						return 0;
+		}
+	}
+
+
+	
 	public static function doSelectJoinAllExceptAnio(Criteria $c, $con = null)
 	{
 		$c = clone $c;
@@ -525,9 +669,14 @@
 		ActividadPeer::addSelectColumns($c);
 		$startcol3 = $startcol2 + ActividadPeer::NUM_COLUMNS;
 
+		OrientacionPeer::addSelectColumns($c);
+		$startcol4 = $startcol3 + OrientacionPeer::NUM_COLUMNS;
+
 		$c->addJoin(RelAnioActividadPeer::FK_ACTIVIDAD_ID, ActividadPeer::ID);
 
+		$c->addJoin(RelAnioActividadPeer::FK_ORIENTACION_ID, OrientacionPeer::ID);
 
+
 		$rs = BasePeer::doSelect($c, $con);
 		$results = array();
 
@@ -561,6 +710,28 @@
 				$obj2->addRelAnioActividad($obj1);
 			}
 
+			$omClass = OrientacionPeer::getOMClass();
+
+
+			$cls = Propel::import($omClass);
+			$obj3  = new $cls();
+			$obj3->hydrate($rs, $startcol3);
+
+			$newObject = true;
+			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+				$temp_obj1 = $results[$j];
+				$temp_obj3 = $temp_obj1->getOrientacion(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+					$newObject = false;
+					$temp_obj3->addRelAnioActividad($obj1);
+					break;
+				}
+			}
+
+			if ($newObject) {
+				$obj3->initRelAnioActividads();
+				$obj3->addRelAnioActividad($obj1);
+			}
+
 			$results[] = $obj1;
 		}
 		return $results;
@@ -582,9 +753,14 @@
 		AnioPeer::addSelectColumns($c);
 		$startcol3 = $startcol2 + AnioPeer::NUM_COLUMNS;
 
+		OrientacionPeer::addSelectColumns($c);
+		$startcol4 = $startcol3 + OrientacionPeer::NUM_COLUMNS;
+
 		$c->addJoin(RelAnioActividadPeer::FK_ANIO_ID, AnioPeer::ID);
 
+		$c->addJoin(RelAnioActividadPeer::FK_ORIENTACION_ID, OrientacionPeer::ID);
 
+
 		$rs = BasePeer::doSelect($c, $con);
 		$results = array();
 
@@ -618,12 +794,118 @@
 				$obj2->addRelAnioActividad($obj1);
 			}
 
+			$omClass = OrientacionPeer::getOMClass();
+
+
+			$cls = Propel::import($omClass);
+			$obj3  = new $cls();
+			$obj3->hydrate($rs, $startcol3);
+
+			$newObject = true;
+			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+				$temp_obj1 = $results[$j];
+				$temp_obj3 = $temp_obj1->getOrientacion(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+					$newObject = false;
+					$temp_obj3->addRelAnioActividad($obj1);
+					break;
+				}
+			}
+
+			if ($newObject) {
+				$obj3->initRelAnioActividads();
+				$obj3->addRelAnioActividad($obj1);
+			}
+
 			$results[] = $obj1;
 		}
 		return $results;
 	}
 
+
 	
+	public static function doSelectJoinAllExceptOrientacion(Criteria $c, $con = null)
+	{
+		$c = clone $c;
+
+								if ($c->getDbName() == Propel::getDefaultDB()) {
+			$c->setDbName(self::DATABASE_NAME);
+		}
+
+		RelAnioActividadPeer::addSelectColumns($c);
+		$startcol2 = (RelAnioActividadPeer::NUM_COLUMNS - RelAnioActividadPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+		AnioPeer::addSelectColumns($c);
+		$startcol3 = $startcol2 + AnioPeer::NUM_COLUMNS;
+
+		ActividadPeer::addSelectColumns($c);
+		$startcol4 = $startcol3 + ActividadPeer::NUM_COLUMNS;
+
+		$c->addJoin(RelAnioActividadPeer::FK_ANIO_ID, AnioPeer::ID);
+
+		$c->addJoin(RelAnioActividadPeer::FK_ACTIVIDAD_ID, ActividadPeer::ID);
+
+
+		$rs = BasePeer::doSelect($c, $con);
+		$results = array();
+
+		while($rs->next()) {
+
+			$omClass = RelAnioActividadPeer::getOMClass();
+
+			$cls = Propel::import($omClass);
+			$obj1 = new $cls();
+			$obj1->hydrate($rs);
+
+			$omClass = AnioPeer::getOMClass();
+
+
+			$cls = Propel::import($omClass);
+			$obj2  = new $cls();
+			$obj2->hydrate($rs, $startcol2);
+
+			$newObject = true;
+			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+				$temp_obj1 = $results[$j];
+				$temp_obj2 = $temp_obj1->getAnio(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+					$newObject = false;
+					$temp_obj2->addRelAnioActividad($obj1);
+					break;
+				}
+			}
+
+			if ($newObject) {
+				$obj2->initRelAnioActividads();
+				$obj2->addRelAnioActividad($obj1);
+			}
+
+			$omClass = ActividadPeer::getOMClass();
+
+
+			$cls = Propel::import($omClass);
+			$obj3  = new $cls();
+			$obj3->hydrate($rs, $startcol3);
+
+			$newObject = true;
+			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+				$temp_obj1 = $results[$j];
+				$temp_obj3 = $temp_obj1->getActividad(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+					$newObject = false;
+					$temp_obj3->addRelAnioActividad($obj1);
+					break;
+				}
+			}
+
+			if ($newObject) {
+				$obj3->initRelAnioActividads();
+				$obj3->addRelAnioActividad($obj1);
+			}
+
+			$results[] = $obj1;
+		}
+		return $results;
+	}
+
+	
 	public static function getTableMap()
 	{
 		return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);




Más información sobre la lista de distribución Alba-desarrollo