[Alba-desarrollo] SVN Alba r4895 - in prosistem/alba/trunk/alba: apps/principal/modules/boletin/templates apps/principal/modules/calendario/templates apps/principal/modules/calendario/validate apps/principal/modules/ciclolectivo/actions apps/principal/modules/division/config apps/principal/modules/division/templates apps/principal/modules/division/validate apps/principal/modules/horarioescolar/actions apps/principal/modules/horarioescolar/config apps/principal/modules/horarioescolar/templates apps/principal/modules/horarioescolar/validate apps/principal/modules/informes/actions apps/principal/modules/relAlumnoDivision/templates apps/principal/templates config data/sql lib/model lib/model/map lib/model/om

commits en pressenter.com.ar commits en pressenter.com.ar
Mie Ago 1 21:29:42 CEST 2007


Author: sabino
Date: 2007-08-01 16:29:19 -0300 (Wed, 01 Aug 2007)
New Revision: 4895

Added:
   prosistem/alba/trunk/alba/apps/principal/modules/division/templates/_fk_turno_id.php
   prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_fk_turno_id.php
   prosistem/alba/trunk/alba/lib/model/Turno.php
   prosistem/alba/trunk/alba/lib/model/TurnoPeer.php
   prosistem/alba/trunk/alba/lib/model/map/TurnoMapBuilder.php
   prosistem/alba/trunk/alba/lib/model/om/BaseTurno.php
   prosistem/alba/trunk/alba/lib/model/om/BaseTurnoPeer.php
Removed:
   prosistem/alba/trunk/alba/apps/principal/modules/division/templates/_fk_turnos_id.php
   prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_fk_turnos_id.php
   prosistem/alba/trunk/alba/lib/model/Turnos.php
   prosistem/alba/trunk/alba/lib/model/TurnosPeer.php
   prosistem/alba/trunk/alba/lib/model/map/TurnosMapBuilder.php
   prosistem/alba/trunk/alba/lib/model/om/BaseTurnos.php
   prosistem/alba/trunk/alba/lib/model/om/BaseTurnosPeer.php
Modified:
   prosistem/alba/trunk/alba/apps/principal/modules/boletin/templates/mostrarSuccess.php
   prosistem/alba/trunk/alba/apps/principal/modules/calendario/templates/indexSuccess.php
   prosistem/alba/trunk/alba/apps/principal/modules/calendario/validate/index.yml
   prosistem/alba/trunk/alba/apps/principal/modules/ciclolectivo/actions/actions.class.php
   prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml
   prosistem/alba/trunk/alba/apps/principal/modules/division/validate/edit.yml
   prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/actions/actions.class.php
   prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/config/generator.yml
   prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_form.php
   prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_turnos_list.php
   prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/validate/edit.yml
   prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php
   prosistem/alba/trunk/alba/apps/principal/modules/relAlumnoDivision/templates/_filtro_fk_division_id.php
   prosistem/alba/trunk/alba/apps/principal/modules/relAlumnoDivision/templates/_fk_division_id.php
   prosistem/alba/trunk/alba/apps/principal/templates/menu.php
   prosistem/alba/trunk/alba/config/schema.yml
   prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql
   prosistem/alba/trunk/alba/data/sql/lib.model.schema.sql
   prosistem/alba/trunk/alba/data/sql/updatedb.sh
   prosistem/alba/trunk/alba/lib/model/map/DivisionMapBuilder.php
   prosistem/alba/trunk/alba/lib/model/map/HorarioescolarMapBuilder.php
   prosistem/alba/trunk/alba/lib/model/om/BaseAnio.php
   prosistem/alba/trunk/alba/lib/model/om/BaseCiclolectivo.php
   prosistem/alba/trunk/alba/lib/model/om/BaseDivision.php
   prosistem/alba/trunk/alba/lib/model/om/BaseDivisionPeer.php
   prosistem/alba/trunk/alba/lib/model/om/BaseEstablecimiento.php
   prosistem/alba/trunk/alba/lib/model/om/BaseEvento.php
   prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolar.php
   prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolarPeer.php
   prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolartipo.php
Log:
Rpimera revici'on del la conversi'on del modulo turnos por turno #143


Modified: prosistem/alba/trunk/alba/apps/principal/modules/boletin/templates/mostrarSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/boletin/templates/mostrarSuccess.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/boletin/templates/mostrarSuccess.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -36,7 +36,7 @@
 <br>
 <div align="center">
 <table style="text-align: left; width: 766px; height: 143px; border-collapse: collapse; border: solid;" border="1" cellpadding="2" cellspacing="2">
-<CAPTION><em>BOLETIN DE CALIFICACIONES PERTENECIENTES A: </em>;&nbsp;<b><?php echo $alumno->getNombre()." ".$alumno->getApellido()?></b>&nbsp;&nbsp;&nbsp;&nbsp;<em>GRADO:</em> &nbsp;<b><?php echo ($division->getAnio())?$division->getAnio()->getDescripcion():""?></b>&nbsp;&nbsp;&nbsp;&nbsp;<em>SECCION:</em>&nbsp; <b><?php echo $division->getDescripcion()?></b>&nbsp;&nbsp;&nbsp;&nbsp;<em>TURNO:</em>&nbsp;<b><?php echo ($division->getTurnos())?$division->getTurnos()->getDescripcion():""?></b><br></CAPTION>
+<CAPTION><em>BOLETIN DE CALIFICACIONES PERTENECIENTES A: </em>;&nbsp;<b><?php echo $alumno->getNombre()." ".$alumno->getApellido()?></b>&nbsp;&nbsp;&nbsp;&nbsp;<em>GRADO:</em> &nbsp;<b><?php echo ($division->getAnio())?$division->getAnio()->getDescripcion():""?></b>&nbsp;&nbsp;&nbsp;&nbsp;<em>SECCION:</em>&nbsp; <b><?php echo $division->getDescripcion()?></b>&nbsp;&nbsp;&nbsp;&nbsp;<em>TURNO:</em>&nbsp;<b><?php echo ($division->getTurno())?$division->getTurno()->getDescripcion():""?></b><br></CAPTION>
   <tbody>
     <tr>
       <td colspan="1" rowspan="2"><div class="etiquetas">PERIODO</div></td>

Modified: prosistem/alba/trunk/alba/apps/principal/modules/calendario/templates/indexSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/calendario/templates/indexSuccess.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/calendario/templates/indexSuccess.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -112,8 +112,8 @@
                         <input type="hidden" name="ciclolectivo_id" value="<?=$ciclolectivo_id?>">
 
                          <div class="form-row">
-                          <?php echo label_for('turnos_id', __('Turnos:'), 'class="required" ') ?>
-                          <?php echo select_tag('turnos_id', options_for_select($optionsTurnos,$turnos_id),'onChange="javascript:submitForm()"') ?>
+                          <?php echo label_for('turno_id', __('Turnos:'), 'class="required" ') ?>
+                          <?php echo select_tag('turno_id', options_for_select($optionsTurnos,$turno_id),'onChange="javascript:submitForm()"') ?>
                          </div>
 
                         <!--

Modified: prosistem/alba/trunk/alba/apps/principal/modules/calendario/validate/index.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/calendario/validate/index.yml	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/calendario/validate/index.yml	2007-08-01 19:29:19 UTC (rev 4895)
@@ -1,7 +1,7 @@
 methods:
-  post:  [ turnos_id ]
+  post:  [ turno_id ]
 
 names:
-    turnos_id:
+    turno_id:
         required:     Yes
         required_msg: El campo turno es obligatorio

Modified: prosistem/alba/trunk/alba/apps/principal/modules/ciclolectivo/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/ciclolectivo/actions/actions.class.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/ciclolectivo/actions/actions.class.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -65,8 +65,8 @@
             $ciclolectivo = CiclolectivoPeer::retrieveByPk($ciclolectivo_id);
         
             $c = new Criteria();
-            $c->add(TurnosPeer::FK_CICLOLECTIVO_ID, $ciclolectivo_id);
-            $aTurnos  = TurnosPeer::doSelect($c);
+            $c->add(TurnoPeer::FK_CICLOLECTIVO_ID, $ciclolectivo_id);
+            $aTurnos  = TurnoPeer::doSelect($c);
         
             $c = new Criteria();
             $c->add(PeriodoPeer::FK_CICLOLECTIVO_ID, $ciclolectivo_id);
@@ -82,7 +82,7 @@
     }
 
     public function executeDeleteTurno ()  {
-        $this->turnos = TurnosPeer::retrieveByPk($this->getRequestParameter('idTurno'));
+        $this->turnos = TurnoPeer::retrieveByPk($this->getRequestParameter('idTurno'));
         $this->forward404Unless($this->turnos);
         $this->turnos->delete();
         return $this->forward('ciclolectivo','agregarTurnosYPeriodos','id/'.$this->getRequestParameter('id'));                
@@ -128,9 +128,9 @@
                 if($turnos['descripcion'] AND ($horaInicio != $horaFin) )  {
                 
                     if(isset($turnos['id']) AND is_numeric($turnos['id'])) {
-                        $this->turnos = TurnosPeer::retrieveByPk($turnos['id']);
+                        $this->turnos = TurnoPeer::retrieveByPk($turnos['id']);
                     } else {
-                        $this->turnos = new Turnos();
+                        $this->turnos = new Turno();
                     }
                 
                     if(isset($turnos['descripcion'])) {
@@ -290,7 +290,7 @@
     function validateDelete() {
         $this->ciclolectivo = CiclolectivoPeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($this->ciclolectivo);
-        if ($this->ciclolectivo->countTurnoss() >0) {
+        if ($this->ciclolectivo->countTurnos() >0) {
             $this->error = "El ciclo lectivo contiene turnos asociados";
             return false;
         }

Modified: prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml	2007-08-01 19:29:19 UTC (rev 4895)
@@ -7,19 +7,19 @@
         anio: { name: A&ntilde;o }
         fk_anio_id: { name: A&ntilde;o }
         division: { name: Divisi&oacute;n }
-        fk_turnos_id: { name: Turnos }
+        fk_turno_id: { name: Turnos }
         descripcion: { name: Descripci&oacute;n }
         orden: { name: Orden }
 
     edit:
         title: Editar Divisi&oacute;n
-        display: [ _fk_anio_id, descripcion, _fk_turnos_id, orden ]
+        display: [ _fk_anio_id, descripcion, _fk_turno_id, orden ]
                     
     list:
         title: Listado de Divisiones
         fields:
             fk_anioorden_id: { name: A&ntilde;o }
-        display: [ anio, descripcion, turnos, orden ]
+        display: [ anio, descripcion, turno, orden ]
         object_actions:
             _edit:      -
             _delete:    -

Copied: prosistem/alba/trunk/alba/apps/principal/modules/division/templates/_fk_turno_id.php (from rev 4876, prosistem/alba/trunk/alba/apps/principal/modules/division/templates/_fk_turnos_id.php)
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/division/templates/_fk_turnos_id.php	2007-07-30 14:58:43 UTC (rev 4876)
+++ prosistem/alba/trunk/alba/apps/principal/modules/division/templates/_fk_turno_id.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -0,0 +1,12 @@
+<?php 
+    $criteriaT = new Criteria(); 
+    $criteriaT->add(TurnoPeer::FK_CICLOLECTIVO_ID, $sf_user->getAttribute('fk_ciclolectivo_id'));    
+    $turnos = TurnoPeer::doSelect($criteriaT);
+    $optionsTurnos = array();
+    $optionsTurnos[""] = "--Seleccione un Turno--";   
+    foreach ($turnos as $turno) {
+        $optionsTurnos[$turno->getId()] = $turno->getDescripcion();
+    }
+    asort($optionsTurnos);
+    echo select_tag('division[fk_turno_id]', options_for_select($optionsTurnos, $division->getFkTurnoId()) ) ;
+?>

Deleted: prosistem/alba/trunk/alba/apps/principal/modules/division/templates/_fk_turnos_id.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/division/templates/_fk_turnos_id.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/division/templates/_fk_turnos_id.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -1,12 +0,0 @@
-<?php 
-    $criteriaT = new Criteria(); 
-    $criteriaT->add(TurnosPeer::FK_CICLOLECTIVO_ID, $sf_user->getAttribute('fk_ciclolectivo_id'));    
-    $turnos = TurnosPeer::doSelect($criteriaT);
-    $optionsTurnos = array();
-    $optionsTurnos[""] = "--Seleccione un Turno--";   
-    foreach ($turnos as $turno) {
-        $optionsTurnos[$turno->getId()] = $turno->getDescripcion();
-    }
-    asort($optionsTurnos);
-    echo select_tag('division[fk_turnos_id]', options_for_select($optionsTurnos, $division->getFkTurnosId()) ) ;
-?>

Modified: prosistem/alba/trunk/alba/apps/principal/modules/division/validate/edit.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/division/validate/edit.yml	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/division/validate/edit.yml	2007-08-01 19:29:19 UTC (rev 4895)
@@ -2,7 +2,7 @@
   post:       
     - "division{descripcion}"    
     - "division{fk_anio_id}"
-    - "division{fk_turnos_id}"  
+    - "division{fk_turno_id}"  
     
 fillin:
     enabled:       on
@@ -13,7 +13,7 @@
         required_msg: El campo descripci&oacute;n es obligatorio
         validators: caracteresMaximos255
 
-    division{fk_turnos_id}:
+    division{fk_turno_id}:
         required:     Yes
         required_msg: El campo Turnos es obligatorio
 

Modified: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/actions/actions.class.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/actions/actions.class.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -85,9 +85,9 @@
     {
       $this->horarioescolar->setFkEstablecimientoId($horarioescolar['fk_establecimiento_id']);
     }
-    if (isset($horarioescolar['fk_turnos_id']))
+    if (isset($horarioescolar['fk_turno_id']))
     {
-      $this->horarioescolar->setFkTurnosId($horarioescolar['fk_turnos_id']);
+      $this->horarioescolar->setFkTurnoId($horarioescolar['fk_turno_id']);
     }
   }
 
@@ -140,7 +140,7 @@
         'horarioescolar{nombre}' => 'Nombre:',
         'horarioescolar{descripcion}' => 'Descripcion:',
         'horarioescolar{fk_horarioescolartipo_id}' => 'Tipo Horario Escolar:',
-        'horarioescolar{fk_turnos_id}' => 'Turno:',
+        'horarioescolar{fk_turno_id}' => 'Turno:',
         'horarioescolar{fk_evento_id}' => 'Evento:',
         );
     }

Modified: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/config/generator.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/config/generator.yml	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/config/generator.yml	2007-08-01 19:29:19 UTC (rev 4895)
@@ -13,12 +13,12 @@
         fk_horarioescolartipo_id: { name: Tipo Horario Escolar }
         dia_mostrar: { name: Día} 
         fk_establecimiento_id: { name: Establecimiento}
-        fk_turnos_id: { name: Turno}
+        fk_turno_id: { name: Turno}
         turnos_list: { name: Turno}
         
     edit:
         title: Modificar Horario Escolar
-        display: [nombre, descripcion, _dia, _hora_inicio, _hora_fin, fk_horarioescolartipo_id, _fk_turnos_id ]
+        display: [nombre, descripcion, _dia, _hora_inicio, _hora_fin, fk_horarioescolartipo_id, _fk_turno_id ]
                                                          
     list:
         display: [=nombre, descripcion, _dia_mostrar , hora_inicio, hora_fin, _fk_horarioescolartipo_id, _fk_establecimiento_id, _turnos_list ]

Modified: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_form.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_form.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_form.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -62,13 +62,13 @@
 </div>
 
 <div class="form-row">
-  <?php echo label_for('horarioescolar[fk_turnos_id]', __($labels['horarioescolar{fk_turnos_id}']), 'class="required" ') ?>
-  <div class="content<?php if ($sf_request->hasError('horarioescolar{fk_turnos_id}')): ?> form-error<?php endif; ?>">
-  <?php if ($sf_request->hasError('horarioescolar{fk_turnos_id}')): ?>
-    <?php echo form_error('horarioescolar{fk_turnos_id}', array('class' => 'form-error-msg')) ?>
+  <?php echo label_for('horarioescolar[fk_turno_id]', __($labels['horarioescolar{fk_turno_id}']), 'class="required" ') ?>
+  <div class="content<?php if ($sf_request->hasError('horarioescolar{fk_turno_id}')): ?> form-error<?php endif; ?>">
+  <?php if ($sf_request->hasError('horarioescolar{fk_turno_id}')): ?>
+    <?php echo form_error('horarioescolar{fk_turno_id}', array('class' => 'form-error-msg')) ?>
   <?php endif; ?>
 
-  <?php $value = get_partial('fk_turnos_id', array('type' => 'edit', 'horarioescolar' => $horarioescolar)); echo $value ? $value : '&nbsp;' ?>
+  <?php $value = get_partial('fk_turno_id', array('type' => 'edit', 'horarioescolar' => $horarioescolar)); echo $value ? $value : '&nbsp;' ?>
     </div>
 </div>
 

Copied: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_fk_turno_id.php (from rev 4876, prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_fk_turnos_id.php)
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_fk_turnos_id.php	2007-07-30 14:58:43 UTC (rev 4876)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_fk_turno_id.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -0,0 +1,11 @@
+<?php
+    $aTurnos = array();
+    $c = new Criteria();
+    $c->add(TurnoPeer::FK_CICLOLECTIVO_ID,$sf_user->getAttribute('fk_ciclolectivo_id'));
+    $sqlTurnos  = TurnoPeer::doSelect($c);
+    foreach($sqlTurnos as $turnos) {
+        $aTurnos[$turnos->getId()] = $turnos->getDescripcion();
+    }
+
+    echo select_tag("horarioescolar[fk_turno_id]", options_for_select($aTurnos, $horarioescolar->getFkTurnoId()));
+?>
\ No newline at end of file

Deleted: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_fk_turnos_id.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_fk_turnos_id.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_fk_turnos_id.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -1,11 +0,0 @@
-<?php
-    $aTurnos = array();
-    $c = new Criteria();
-    $c->add(TurnosPeer::FK_CICLOLECTIVO_ID,$sf_user->getAttribute('fk_ciclolectivo_id'));
-    $sqlTurnos  = TurnosPeer::doSelect($c);
-    foreach($sqlTurnos as $turnos) {
-        $aTurnos[$turnos->getId()] = $turnos->getDescripcion();
-    }
-
-    echo select_tag("horarioescolar[fk_turnos_id]", options_for_select($aTurnos, $horarioescolar->getFkTurnosId()));
-?>
\ No newline at end of file

Modified: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_turnos_list.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_turnos_list.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_turnos_list.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -1,6 +1,6 @@
 <?php 
-    if ($horarioescolar->getTurnos()) {
-        echo $horarioescolar->getTurnos()->getDescripcion();
+    if ($horarioescolar->getTurno()) {
+        echo $horarioescolar->getTurno()->getDescripcion();
     }
 ?>
         
\ No newline at end of file

Modified: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/validate/edit.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/validate/edit.yml	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/validate/edit.yml	2007-08-01 19:29:19 UTC (rev 4895)
@@ -2,7 +2,7 @@
   post:       
     - "horarioescolar{nombre}"   
     - "horarioescolar{descripcion}"
-    - "horarioescolar{fk_turnos_id}"
+    - "horarioescolar{fk_turno_id}"
     - "horarioescolar{fk_horarioescolartipo_id}"
     
 fillin:
@@ -18,7 +18,7 @@
         required_msg: El campo nombre  es obligatorio
         validators: caracteresMaximos128
 
-    horarioescolar{fk_turnos_id}:
+    horarioescolar{fk_turno_id}:
         required:     Yes
         required_msg: El campo turnos es obligatorio
 

Modified: prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/informes/actions/actions.class.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -218,7 +218,7 @@
         $alumno = AlumnoPeer::retrieveByPK($alumno_id);
         $division = DivisionPeer::retrieveByPK($division_id);
         $establecimiento = EstablecimientoPeer::retrieveByPK($establecimiento_id);
-        $turnos = TurnosPeer::retrieveByPK($division->getFkTurnosId());
+        $turnos = TurnoPeer::retrieveByPK($division->getFkTurnoId());
 
         $criteria = new Criteria();
         $criteria->add(RelEstablecimientoLocacionPeer::FK_ESTABLECIMIENTO_ID, $establecimiento_id);

Modified: prosistem/alba/trunk/alba/apps/principal/modules/relAlumnoDivision/templates/_filtro_fk_division_id.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relAlumnoDivision/templates/_filtro_fk_division_id.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relAlumnoDivision/templates/_filtro_fk_division_id.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -3,7 +3,7 @@
     $c->add(AnioPeer::FK_ESTABLECIMIENTO_ID, $sf_user->getAttribute('fk_establecimiento_id'));    
     $c->add(TurnosPeer::FK_CICLOLECTIVO_ID, $sf_user->getAttribute('fk_ciclolectivo_id'));
     $c->addJoin(AnioPeer::ID,DivisionPeer::FK_ANIO_ID);
-    $c->addJoin(TurnosPeer::ID,DivisionPeer::FK_TURNOS_ID);
+    $c->addJoin(TurnoPeer::ID,DivisionPeer::FK_TURNO_ID);
     
     //$c->addAscendingOrderByColumn(AlumnoPeer::APELLIDO);
     //$c->addAscendingOrderByColumn(AlumnoPeer::NOMBRE);

Modified: prosistem/alba/trunk/alba/apps/principal/modules/relAlumnoDivision/templates/_fk_division_id.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/relAlumnoDivision/templates/_fk_division_id.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/modules/relAlumnoDivision/templates/_fk_division_id.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -3,7 +3,7 @@
     $c->add(AnioPeer::FK_ESTABLECIMIENTO_ID, $sf_user->getAttribute('fk_establecimiento_id'));    
     $c->add(TurnosPeer::FK_CICLOLECTIVO_ID, $sf_user->getAttribute('fk_ciclolectivo_id'));
     $c->addJoin(AnioPeer::ID,DivisionPeer::FK_ANIO_ID);
-    $c->addJoin(TurnosPeer::ID,DivisionPeer::FK_TURNOS_ID);
+    $c->addJoin(TurnoPeer::ID,DivisionPeer::FK_TURNO_ID);
     
     //$c->addAscendingOrderByColumn(AlumnoPeer::APELLIDO);
     //$c->addAscendingOrderByColumn(AlumnoPeer::NOMBRE);

Modified: prosistem/alba/trunk/alba/apps/principal/templates/menu.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/templates/menu.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/apps/principal/templates/menu.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -44,7 +44,7 @@
                             <ul>
 	                            <li><span></span><?php echo link_to("Definir Ciclos Lectivos","ciclolectivo")?></li>
 	                            <li><span></span><?php echo link_to("Definir Períodos","ciclolectivo/agregarTurnosYPeriodos")?></li>
-	                            <li><span></span><?php echo link_to("Definir turnos","turnos")?></li>
+	                            <li><span></span><?php echo link_to("Definir turnos","turno")?></li>
 	                            <li><span></span><?php echo link_to("Tipos de intevalos de horario escolar","horarioescolartipo")?></li>
 	                            <li><span></span><?php echo link_to("Definir feriados del a&ntilde;o","feriado")?></li>
 	                            <li><span></span><?php echo link_to("Calendario de vacunas","calendariovacunacion")?></li>

Modified: prosistem/alba/trunk/alba/config/schema.yml
===================================================================
--- prosistem/alba/trunk/alba/config/schema.yml	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/config/schema.yml	2007-08-01 19:29:19 UTC (rev 4895)
@@ -783,7 +783,7 @@
       type: boolean
       required: true
       default: false
-  turnos: 
+  turno: 
     _attributes: 
       idMethod: native
     id: 
@@ -1294,12 +1294,12 @@
       type: varchar
       size: 255
       required: true
-    fk_turnos_id: 
+    fk_turno_id: 
       type: integer
       size: 11
       required: true
       default: 0
-      foreignTable: turnos
+      foreignTable: turno
       foreignReference: id
     orden: 
       type: INTEGER
@@ -1652,11 +1652,11 @@
       default: 0
       foreignTable: establecimiento
       foreignReference: id
-    fk_turnos_id: 
+    fk_turno_id: 
       type: INTEGER
       required: true
       default: 0
-      foreignTable: turnos
+      foreignTable: turno
       foreignReference: id
     fk_horarioescolartipo_id: 
       type: INTEGER

Modified: prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql	2007-08-01 19:29:19 UTC (rev 4895)
@@ -2454,20 +2454,20 @@
 -- Volcar la base de datos para la tabla `division`
 -- 
 
-INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turnos_id`, `orden`) VALUES (8, 1, 'A', 4, 0);
-INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turnos_id`, `orden`) VALUES (9, 1, 'B', 5, 0);
-INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turnos_id`, `orden`) VALUES (10, 2, 'A', 4, 0);
-INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turnos_id`, `orden`) VALUES (11, 2, 'B', 5, 0);
-INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turnos_id`, `orden`) VALUES (12, 3, 'A', 4, 0);
-INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turnos_id`, `orden`) VALUES (13, 3, 'B', 5, 0);
-INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turnos_id`, `orden`) VALUES (14, 4, 'A', 4, 0);
-INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turnos_id`, `orden`) VALUES (15, 4, 'B', 5, 0);
-INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turnos_id`, `orden`) VALUES (16, 5, 'A', 4, 0);
-INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turnos_id`, `orden`) VALUES (17, 5, 'B', 5, 0);
-INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turnos_id`, `orden`) VALUES (18, 6, 'A', 4, 0);
-INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turnos_id`, `orden`) VALUES (19, 6, 'B', 5, 0);
-INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turnos_id`, `orden`) VALUES (20, 7, 'A', 4, 0);
-INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turnos_id`, `orden`) VALUES (21, 7, 'B', 5, 0);
+INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turno_id`, `orden`) VALUES (8, 1, 'A', 4, 0);
+INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turno_id`, `orden`) VALUES (9, 1, 'B', 5, 0);
+INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turno_id`, `orden`) VALUES (10, 2, 'A', 4, 0);
+INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turno_id`, `orden`) VALUES (11, 2, 'B', 5, 0);
+INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turno_id`, `orden`) VALUES (12, 3, 'A', 4, 0);
+INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turno_id`, `orden`) VALUES (13, 3, 'B', 5, 0);
+INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turno_id`, `orden`) VALUES (14, 4, 'A', 4, 0);
+INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turno_id`, `orden`) VALUES (15, 4, 'B', 5, 0);
+INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turno_id`, `orden`) VALUES (16, 5, 'A', 4, 0);
+INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turno_id`, `orden`) VALUES (17, 5, 'B', 5, 0);
+INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turno_id`, `orden`) VALUES (18, 6, 'A', 4, 0);
+INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turno_id`, `orden`) VALUES (19, 6, 'B', 5, 0);
+INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turno_id`, `orden`) VALUES (20, 7, 'A', 4, 0);
+INSERT INTO `division` (`id`, `fk_anio_id`, `descripcion`, `fk_turno_id`, `orden`) VALUES (21, 7, 'B', 5, 0);
 
 -- 
 -- Volcar la base de datos para la tabla `docente`
@@ -2573,24 +2573,24 @@
 -- Volcar la base de datos para la tabla `horarioescolar`
 -- 
 
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (1, 'Primera hora', 'Primera hora de clase.', 1, 4, 1, 7);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (2, 'Segunda hora.', 'Segunda hora de clases.', 1, 4, 1, 8);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (3, 'Primer recreo.', 'Primer recreo: duración 20 minutos.', 1, 4, 2, 9);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (4, 'Tercera hora.', 'Tercera hora de clases.', 1, 4, 1, 10);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (5, 'Cuarta hora.', 'Cuarta hora de clases.', 1, 4, 1, 11);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (6, 'Segundo recreo.', 'Segundo recreo: duración  10 minutos.', 1, 4, 2, 12);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (7, 'Quinta hora. ', 'Quinta hora de clases.', 1, 4, 2, 13);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (8, 'Tercer recreo.', 'Tercer recreo: duración 10 minutos.', 1, 4, 2, 14);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (9, 'Sexta hora. ', 'Sexta hora de clases.', 1, 4, 1, 15);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (10, 'Primera hora.', 'Primera hora de clase.', 1, 5, 1, 16);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (11, 'Segunda hora.', 'Segunda hora de clases.', 1, 5, 1, 17);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (12, 'Primer recreo.', 'Primer recreo: duración 20 minutos.', 1, 5, 2, 18);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (13, 'Tercera hora.', 'Tercera hora de clases.', 1, 5, 1, 19);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (14, 'Cuarta hora.', 'Cuarta hora de clases.', 1, 5, 1, 20);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (15, 'Segundo recreo.', 'Segundo recreo: duración  10 minutos.', 1, 5, 2, 21);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (16, 'Quinta hora. ', 'Quinta hora de clases.', 1, 5, 1, 22);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (17, 'Tercer recreo.', 'Tercer recreo: duración 10 minutos.', 1, 5, 2, 23);
-INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turnos_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (18, 'Sexta hora. ', 'Sexta hora de clases.', 1, 5, 1, 24);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (1, 'Primera hora', 'Primera hora de clase.', 1, 4, 1, 7);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (2, 'Segunda hora.', 'Segunda hora de clases.', 1, 4, 1, 8);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (3, 'Primer recreo.', 'Primer recreo: duración 20 minutos.', 1, 4, 2, 9);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (4, 'Tercera hora.', 'Tercera hora de clases.', 1, 4, 1, 10);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (5, 'Cuarta hora.', 'Cuarta hora de clases.', 1, 4, 1, 11);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (6, 'Segundo recreo.', 'Segundo recreo: duración  10 minutos.', 1, 4, 2, 12);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (7, 'Quinta hora. ', 'Quinta hora de clases.', 1, 4, 2, 13);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (8, 'Tercer recreo.', 'Tercer recreo: duración 10 minutos.', 1, 4, 2, 14);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (9, 'Sexta hora. ', 'Sexta hora de clases.', 1, 4, 1, 15);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (10, 'Primera hora.', 'Primera hora de clase.', 1, 5, 1, 16);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (11, 'Segunda hora.', 'Segunda hora de clases.', 1, 5, 1, 17);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (12, 'Primer recreo.', 'Primer recreo: duración 20 minutos.', 1, 5, 2, 18);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (13, 'Tercera hora.', 'Tercera hora de clases.', 1, 5, 1, 19);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (14, 'Cuarta hora.', 'Cuarta hora de clases.', 1, 5, 1, 20);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (15, 'Segundo recreo.', 'Segundo recreo: duración  10 minutos.', 1, 5, 2, 21);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (16, 'Quinta hora. ', 'Quinta hora de clases.', 1, 5, 1, 22);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (17, 'Tercer recreo.', 'Tercer recreo: duración 10 minutos.', 1, 5, 2, 23);
+INSERT INTO `horarioescolar` (`id`, `nombre`, `descripcion`, `fk_establecimiento_id`, `fk_turno_id`, `fk_horarioescolartipo_id`, `fk_evento_id`) VALUES (18, 'Sexta hora. ', 'Sexta hora de clases.', 1, 5, 1, 24);
 
 
 -- 
@@ -2750,7 +2750,7 @@
 INSERT INTO `permiso` (`id`, `nombre`, `descripcion`, `credencial`, `fk_modulo_id`) VALUES (32, 'responsable', '', 'responsable', 28);
 INSERT INTO `permiso` (`id`, `nombre`, `descripcion`, `credencial`, `fk_modulo_id`) VALUES (33, 'rol', '', 'rol', 29);
 INSERT INTO `permiso` (`id`, `nombre`, `descripcion`, `credencial`, `fk_modulo_id`) VALUES (34, 'tipoiva', '', 'tipoiva', 31);
-INSERT INTO `permiso` (`id`, `nombre`, `descripcion`, `credencial`, `fk_modulo_id`) VALUES (35, 'turnos', '', 'turnos', 32);
+INSERT INTO `permiso` (`id`, `nombre`, `descripcion`, `credencial`, `fk_modulo_id`) VALUES (35, 'turno', '', 'turno', 32);
 INSERT INTO `permiso` (`id`, `nombre`, `descripcion`, `credencial`, `fk_modulo_id`) VALUES (36, 'tipolocacion', '', 'tipolocacion', 34);
 INSERT INTO `permiso` (`id`, `nombre`, `descripcion`, `credencial`, `fk_modulo_id`) VALUES (37, 'tipoespacio', '', 'tipoespacio', 36);
 INSERT INTO `permiso` (`id`, `nombre`, `descripcion`, `credencial`, `fk_modulo_id`) VALUES (38, 'espacio', '', 'espacio', 35);
@@ -3333,12 +3333,12 @@
 INSERT INTO `tipolocacion` (`id`, `nombre`, `descripcion`) VALUES (2, 'Anexo.', 'Unidades complementarias a la sede.');
 
 -- 
--- Volcar la base de datos para la tabla `turnos`
+-- Volcar la base de datos para la tabla `turno`
 -- 
 
-INSERT INTO `turnos` (`id`, `fk_ciclolectivo_id`, `hora_inicio`, `hora_fin`, `descripcion`) VALUES (4, 1, '07:30:00', '12:15:00', 'Mañana');
-INSERT INTO `turnos` (`id`, `fk_ciclolectivo_id`, `hora_inicio`, `hora_fin`, `descripcion`) VALUES (5, 1, '12:30:00', '17:10:00', 'Tarde');
-INSERT INTO `turnos` (`id`, `fk_ciclolectivo_id`, `hora_inicio`, `hora_fin`, `descripcion`) VALUES (6, 1, '17:10:00', '21:00:00', 'Fuera de horario escolar.');
+INSERT INTO `turno` (`id`, `fk_ciclolectivo_id`, `hora_inicio`, `hora_fin`, `descripcion`) VALUES (4, 1, '07:30:00', '12:15:00', 'Mañana');
+INSERT INTO `turno` (`id`, `fk_ciclolectivo_id`, `hora_inicio`, `hora_fin`, `descripcion`) VALUES (5, 1, '12:30:00', '17:10:00', 'Tarde');
+INSERT INTO `turno` (`id`, `fk_ciclolectivo_id`, `hora_inicio`, `hora_fin`, `descripcion`) VALUES (6, 1, '17:10:00', '21:00:00', 'Fuera de horario escolar.');
 
 -- 
 -- Volcar la base de datos para la tabla `usuario`

Modified: prosistem/alba/trunk/alba/data/sql/lib.model.schema.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/lib.model.schema.sql	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/data/sql/lib.model.schema.sql	2007-08-01 19:29:19 UTC (rev 4895)
@@ -580,13 +580,13 @@
 )Type=InnoDB;
 
 #-----------------------------------------------------------------------------
-#-- turnos
+#-- turno
 #-----------------------------------------------------------------------------
 
-DROP TABLE IF EXISTS `turnos`;
+DROP TABLE IF EXISTS `turno`;
 
 
-CREATE TABLE `turnos`
+CREATE TABLE `turno`
 (
 	`id` INTEGER(11)  NOT NULL AUTO_INCREMENT,
 	`fk_ciclolectivo_id` INTEGER(11)  NOT NULL,
@@ -594,8 +594,8 @@
 	`hora_fin` TIME  NOT NULL,
 	`descripcion` VARCHAR(255)  NOT NULL,
 	PRIMARY KEY (`id`),
-	INDEX `turnos_FI_1` (`fk_ciclolectivo_id`),
-	CONSTRAINT `turnos_FK_1`
+	INDEX `turno_FI_1` (`fk_ciclolectivo_id`),
+	CONSTRAINT `turno_FK_1`
 		FOREIGN KEY (`fk_ciclolectivo_id`)
 		REFERENCES `ciclolectivo` (`id`)
 )Type=InnoDB;
@@ -1000,17 +1000,17 @@
 	`id` INTEGER(11)  NOT NULL AUTO_INCREMENT,
 	`fk_anio_id` INTEGER(11) default 0 NOT NULL,
 	`descripcion` VARCHAR(255)  NOT NULL,
-	`fk_turnos_id` INTEGER(11) default 0 NOT NULL,
+	`fk_turno_id` INTEGER(11) default 0 NOT NULL,
 	`orden` INTEGER default 0,
 	PRIMARY KEY (`id`),
 	INDEX `division_FI_1` (`fk_anio_id`),
 	CONSTRAINT `division_FK_1`
 		FOREIGN KEY (`fk_anio_id`)
 		REFERENCES `anio` (`id`),
-	INDEX `division_FI_2` (`fk_turnos_id`),
+	INDEX `division_FI_2` (`fk_turno_id`),
 	CONSTRAINT `division_FK_2`
-		FOREIGN KEY (`fk_turnos_id`)
-		REFERENCES `turnos` (`id`)
+		FOREIGN KEY (`fk_turno_id`)
+		REFERENCES `turno` (`id`)
 )Type=InnoDB;
 
 #-----------------------------------------------------------------------------
@@ -1285,7 +1285,7 @@
 	`descripcion` VARCHAR(255),
 	`fk_evento_id` INTEGER default 0 NOT NULL,
 	`fk_establecimiento_id` INTEGER default 0 NOT NULL,
-	`fk_turnos_id` INTEGER default 0 NOT NULL,
+	`fk_turno_id` INTEGER default 0 NOT NULL,
 	`fk_horarioescolartipo_id` INTEGER default 0 NOT NULL,
 	PRIMARY KEY (`id`),
 	INDEX `horarioescolar_FI_1` (`fk_evento_id`),
@@ -1297,10 +1297,10 @@
 	CONSTRAINT `horarioescolar_FK_2`
 		FOREIGN KEY (`fk_establecimiento_id`)
 		REFERENCES `establecimiento` (`id`),
-	INDEX `horarioescolar_FI_3` (`fk_turnos_id`),
+	INDEX `horarioescolar_FI_3` (`fk_turno_id`),
 	CONSTRAINT `horarioescolar_FK_3`
-		FOREIGN KEY (`fk_turnos_id`)
-		REFERENCES `turnos` (`id`),
+		FOREIGN KEY (`fk_turno_id`)
+		REFERENCES `turno` (`id`),
 	INDEX `horarioescolar_FI_4` (`fk_horarioescolartipo_id`),
 	CONSTRAINT `horarioescolar_FK_4`
 		FOREIGN KEY (`fk_horarioescolartipo_id`)

Modified: prosistem/alba/trunk/alba/data/sql/updatedb.sh
===================================================================
--- prosistem/alba/trunk/alba/data/sql/updatedb.sh	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/data/sql/updatedb.sh	2007-08-01 19:29:19 UTC (rev 4895)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 CONFIGURACIONDB="../../config/databases.yml"
-SCHEMA="ib.model.schema.sql"
+SCHEMA="lib.model.schema.sql"
 EJEMPLO="datos_ejemplo.sql"
 DSNARCHIVO=`cat ../../config/databases.yml | grep dsn: | tr -d " "`
 DSN=${DSNARCHIVO#dsn:*}

Added: prosistem/alba/trunk/alba/lib/model/Turno.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/Turno.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/Turno.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * Subclass for representing a row from the 'turno' table.
+ *
+ * 
+ *
+ * @package lib.model
+ */ 
+class Turno extends BaseTurno
+{
+}

Added: prosistem/alba/trunk/alba/lib/model/TurnoPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/TurnoPeer.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/TurnoPeer.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * Subclass for performing query and update operations on the 'turno' table.
+ *
+ * 
+ *
+ * @package lib.model
+ */ 
+class TurnoPeer extends BaseTurnoPeer
+{
+}

Deleted: prosistem/alba/trunk/alba/lib/model/Turnos.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/Turnos.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/Turnos.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -1,22 +0,0 @@
-<?php
-
-require_once 'lib/model/om/BaseTurnos.php';
-
-
-/**
- * Skeleton subclass for representing a row from the 'turnos' table.
- *
- * 
- *
- * You should add additional methods to this class to meet the
- * application requirements.  This class will only be generated as
- * long as it does not already exist in the output directory.
- *
- * @package model
- */	
-class Turnos extends BaseTurnos {
-    public function __toString() {
-         return $this->getDescripcion() ;
-    }        
-
-} // Turnos

Deleted: prosistem/alba/trunk/alba/lib/model/TurnosPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/TurnosPeer.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/TurnosPeer.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -1,23 +0,0 @@
-<?php
-
-  // include base peer class
-  require_once 'lib/model/om/BaseTurnosPeer.php';
-  
-  // include object class
-  include_once 'lib/model/Turnos.php';
-
-
-/**
- * Skeleton subclass for performing query and update operations on the 'turnos' table.
- *
- * 
- *
- * You should add additional methods to this class to meet the
- * application requirements.  This class will only be generated as
- * long as it does not already exist in the output directory.
- *
- * @package model
- */	
-class TurnosPeer extends BaseTurnosPeer {
-
-} // TurnosPeer

Modified: prosistem/alba/trunk/alba/lib/model/map/DivisionMapBuilder.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/map/DivisionMapBuilder.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/map/DivisionMapBuilder.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -38,7 +38,7 @@
 
 		$tMap->addColumn('DESCRIPCION', 'Descripcion', 'string', CreoleTypes::VARCHAR, true, 255);
 
-		$tMap->addForeignKey('FK_TURNOS_ID', 'FkTurnosId', 'int', CreoleTypes::INTEGER, 'turnos', 'ID', true, 11);
+		$tMap->addForeignKey('FK_TURNO_ID', 'FkTurnoId', 'int', CreoleTypes::INTEGER, 'turno', 'ID', true, 11);
 
 		$tMap->addColumn('ORDEN', 'Orden', 'int', CreoleTypes::INTEGER, false, null);
 

Modified: prosistem/alba/trunk/alba/lib/model/map/HorarioescolarMapBuilder.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/map/HorarioescolarMapBuilder.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/map/HorarioescolarMapBuilder.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -42,7 +42,7 @@
 
 		$tMap->addForeignKey('FK_ESTABLECIMIENTO_ID', 'FkEstablecimientoId', 'int', CreoleTypes::INTEGER, 'establecimiento', 'ID', true, null);
 
-		$tMap->addForeignKey('FK_TURNOS_ID', 'FkTurnosId', 'int', CreoleTypes::INTEGER, 'turnos', 'ID', true, null);
+		$tMap->addForeignKey('FK_TURNO_ID', 'FkTurnoId', 'int', CreoleTypes::INTEGER, 'turno', 'ID', true, null);
 
 		$tMap->addForeignKey('FK_HORARIOESCOLARTIPO_ID', 'FkHorarioescolartipoId', 'int', CreoleTypes::INTEGER, 'horarioescolartipo', 'ID', true, null);
 

Added: prosistem/alba/trunk/alba/lib/model/map/TurnoMapBuilder.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/map/TurnoMapBuilder.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/map/TurnoMapBuilder.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -0,0 +1,46 @@
+<?php
+
+
+
+class TurnoMapBuilder {
+
+	
+	const CLASS_NAME = 'lib.model.map.TurnoMapBuilder';
+
+	
+	private $dbMap;
+
+	
+	public function isBuilt()
+	{
+		return ($this->dbMap !== null);
+	}
+
+	
+	public function getDatabaseMap()
+	{
+		return $this->dbMap;
+	}
+
+	
+	public function doBuild()
+	{
+		$this->dbMap = Propel::getDatabaseMap('alba');
+
+		$tMap = $this->dbMap->addTable('turno');
+		$tMap->setPhpName('Turno');
+
+		$tMap->setUseIdGenerator(true);
+
+		$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, 11);
+
+		$tMap->addForeignKey('FK_CICLOLECTIVO_ID', 'FkCiclolectivoId', 'int', CreoleTypes::INTEGER, 'ciclolectivo', 'ID', true, 11);
+
+		$tMap->addColumn('HORA_INICIO', 'HoraInicio', 'int', CreoleTypes::TIME, true, null);
+
+		$tMap->addColumn('HORA_FIN', 'HoraFin', 'int', CreoleTypes::TIME, true, null);
+
+		$tMap->addColumn('DESCRIPCION', 'Descripcion', 'string', CreoleTypes::VARCHAR, true, 255);
+
+	} 
+} 
\ No newline at end of file

Deleted: prosistem/alba/trunk/alba/lib/model/map/TurnosMapBuilder.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/map/TurnosMapBuilder.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/map/TurnosMapBuilder.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -1,46 +0,0 @@
-<?php
-
-
-
-class TurnosMapBuilder {
-
-	
-	const CLASS_NAME = 'lib.model.map.TurnosMapBuilder';
-
-	
-	private $dbMap;
-
-	
-	public function isBuilt()
-	{
-		return ($this->dbMap !== null);
-	}
-
-	
-	public function getDatabaseMap()
-	{
-		return $this->dbMap;
-	}
-
-	
-	public function doBuild()
-	{
-		$this->dbMap = Propel::getDatabaseMap('alba');
-
-		$tMap = $this->dbMap->addTable('turnos');
-		$tMap->setPhpName('Turnos');
-
-		$tMap->setUseIdGenerator(true);
-
-		$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, 11);
-
-		$tMap->addForeignKey('FK_CICLOLECTIVO_ID', 'FkCiclolectivoId', 'int', CreoleTypes::INTEGER, 'ciclolectivo', 'ID', true, 11);
-
-		$tMap->addColumn('HORA_INICIO', 'HoraInicio', 'int', CreoleTypes::TIME, true, null);
-
-		$tMap->addColumn('HORA_FIN', 'HoraFin', 'int', CreoleTypes::TIME, true, null);
-
-		$tMap->addColumn('DESCRIPCION', 'Descripcion', 'string', CreoleTypes::VARCHAR, true, 255);
-
-	} 
-} 
\ No newline at end of file

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseAnio.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseAnio.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseAnio.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -537,7 +537,7 @@
 
 
 	
-	public function getDivisionsJoinTurnos($criteria = null, $con = null)
+	public function getDivisionsJoinTurno($criteria = null, $con = null)
 	{
 				include_once 'lib/model/om/BaseDivisionPeer.php';
 		if ($criteria === null) {
@@ -555,14 +555,14 @@
 
 				$criteria->add(DivisionPeer::FK_ANIO_ID, $this->getId());
 
-				$this->collDivisions = DivisionPeer::doSelectJoinTurnos($criteria, $con);
+				$this->collDivisions = DivisionPeer::doSelectJoinTurno($criteria, $con);
 			}
 		} else {
 									
 			$criteria->add(DivisionPeer::FK_ANIO_ID, $this->getId());
 
 			if (!isset($this->lastDivisionCriteria) || !$this->lastDivisionCriteria->equals($criteria)) {
-				$this->collDivisions = DivisionPeer::doSelectJoinTurnos($criteria, $con);
+				$this->collDivisions = DivisionPeer::doSelectJoinTurno($criteria, $con);
 			}
 		}
 		$this->lastDivisionCriteria = $criteria;

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseCiclolectivo.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseCiclolectivo.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseCiclolectivo.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -35,10 +35,10 @@
 	protected $aEstablecimiento;
 
 	
-	protected $collTurnoss;
+	protected $collTurnos;
 
 	
-	protected $lastTurnosCriteria = null;
+	protected $lastTurnoCriteria = null;
 
 	
 	protected $collPeriodos;
@@ -318,8 +318,8 @@
 				}
 				$this->resetModified(); 			}
 
-			if ($this->collTurnoss !== null) {
-				foreach($this->collTurnoss as $referrerFK) {
+			if ($this->collTurnos !== null) {
+				foreach($this->collTurnos as $referrerFK) {
 					if (!$referrerFK->isDeleted()) {
 						$affectedRows += $referrerFK->save($con);
 					}
@@ -391,8 +391,8 @@
 			}
 
 
-				if ($this->collTurnoss !== null) {
-					foreach($this->collTurnoss as $referrerFK) {
+				if ($this->collTurnos !== null) {
+					foreach($this->collTurnos as $referrerFK) {
 						if (!$referrerFK->validate($columns)) {
 							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
 						}
@@ -570,8 +570,8 @@
 		if ($deepCopy) {
 									$copyObj->setNew(false);
 
-			foreach($this->getTurnoss() as $relObj) {
-				$copyObj->addTurnos($relObj->copy($deepCopy));
+			foreach($this->getTurnos() as $relObj) {
+				$copyObj->addTurno($relObj->copy($deepCopy));
 			}
 
 			foreach($this->getPeriodos() as $relObj) {
@@ -638,17 +638,17 @@
 	}
 
 	
-	public function initTurnoss()
+	public function initTurnos()
 	{
-		if ($this->collTurnoss === null) {
-			$this->collTurnoss = array();
+		if ($this->collTurnos === null) {
+			$this->collTurnos = array();
 		}
 	}
 
 	
-	public function getTurnoss($criteria = null, $con = null)
+	public function getTurnos($criteria = null, $con = null)
 	{
-				include_once 'lib/model/om/BaseTurnosPeer.php';
+				include_once 'lib/model/om/BaseTurnoPeer.php';
 		if ($criteria === null) {
 			$criteria = new Criteria();
 		}
@@ -657,36 +657,36 @@
 			$criteria = clone $criteria;
 		}
 
-		if ($this->collTurnoss === null) {
+		if ($this->collTurnos === null) {
 			if ($this->isNew()) {
-			   $this->collTurnoss = array();
+			   $this->collTurnos = array();
 			} else {
 
-				$criteria->add(TurnosPeer::FK_CICLOLECTIVO_ID, $this->getId());
+				$criteria->add(TurnoPeer::FK_CICLOLECTIVO_ID, $this->getId());
 
-				TurnosPeer::addSelectColumns($criteria);
-				$this->collTurnoss = TurnosPeer::doSelect($criteria, $con);
+				TurnoPeer::addSelectColumns($criteria);
+				$this->collTurnos = TurnoPeer::doSelect($criteria, $con);
 			}
 		} else {
 						if (!$this->isNew()) {
 												
 
-				$criteria->add(TurnosPeer::FK_CICLOLECTIVO_ID, $this->getId());
+				$criteria->add(TurnoPeer::FK_CICLOLECTIVO_ID, $this->getId());
 
-				TurnosPeer::addSelectColumns($criteria);
-				if (!isset($this->lastTurnosCriteria) || !$this->lastTurnosCriteria->equals($criteria)) {
-					$this->collTurnoss = TurnosPeer::doSelect($criteria, $con);
+				TurnoPeer::addSelectColumns($criteria);
+				if (!isset($this->lastTurnoCriteria) || !$this->lastTurnoCriteria->equals($criteria)) {
+					$this->collTurnos = TurnoPeer::doSelect($criteria, $con);
 				}
 			}
 		}
-		$this->lastTurnosCriteria = $criteria;
-		return $this->collTurnoss;
+		$this->lastTurnoCriteria = $criteria;
+		return $this->collTurnos;
 	}
 
 	
-	public function countTurnoss($criteria = null, $distinct = false, $con = null)
+	public function countTurnos($criteria = null, $distinct = false, $con = null)
 	{
-				include_once 'lib/model/om/BaseTurnosPeer.php';
+				include_once 'lib/model/om/BaseTurnoPeer.php';
 		if ($criteria === null) {
 			$criteria = new Criteria();
 		}
@@ -695,15 +695,15 @@
 			$criteria = clone $criteria;
 		}
 
-		$criteria->add(TurnosPeer::FK_CICLOLECTIVO_ID, $this->getId());
+		$criteria->add(TurnoPeer::FK_CICLOLECTIVO_ID, $this->getId());
 
-		return TurnosPeer::doCount($criteria, $distinct, $con);
+		return TurnoPeer::doCount($criteria, $distinct, $con);
 	}
 
 	
-	public function addTurnos(Turnos $l)
+	public function addTurno(Turno $l)
 	{
-		$this->collTurnoss[] = $l;
+		$this->collTurnos[] = $l;
 		$l->setCiclolectivo($this);
 	}
 

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseDivision.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseDivision.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseDivision.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -21,7 +21,7 @@
 
 
 	
-	protected $fk_turnos_id = 0;
+	protected $fk_turno_id = 0;
 
 
 	
@@ -31,7 +31,7 @@
 	protected $aAnio;
 
 	
-	protected $aTurnos;
+	protected $aTurno;
 
 	
 	protected $collRelAlumnoDivisions;
@@ -73,10 +73,10 @@
 	}
 
 	
-	public function getFkTurnosId()
+	public function getFkTurnoId()
 	{
 
-		return $this->fk_turnos_id;
+		return $this->fk_turno_id;
 	}
 
 	
@@ -133,20 +133,20 @@
 
 	} 
 	
-	public function setFkTurnosId($v)
+	public function setFkTurnoId($v)
 	{
 
 						if ($v !== null && !is_int($v) && is_numeric($v)) {
 			$v = (int) $v;
 		}
 
-		if ($this->fk_turnos_id !== $v || $v === 0) {
-			$this->fk_turnos_id = $v;
-			$this->modifiedColumns[] = DivisionPeer::FK_TURNOS_ID;
+		if ($this->fk_turno_id !== $v || $v === 0) {
+			$this->fk_turno_id = $v;
+			$this->modifiedColumns[] = DivisionPeer::FK_TURNO_ID;
 		}
 
-		if ($this->aTurnos !== null && $this->aTurnos->getId() !== $v) {
-			$this->aTurnos = null;
+		if ($this->aTurno !== null && $this->aTurno->getId() !== $v) {
+			$this->aTurno = null;
 		}
 
 	} 
@@ -175,7 +175,7 @@
 
 			$this->descripcion = $rs->getString($startcol + 2);
 
-			$this->fk_turnos_id = $rs->getInt($startcol + 3);
+			$this->fk_turno_id = $rs->getInt($startcol + 3);
 
 			$this->orden = $rs->getInt($startcol + 4);
 
@@ -248,11 +248,11 @@
 				$this->setAnio($this->aAnio);
 			}
 
-			if ($this->aTurnos !== null) {
-				if ($this->aTurnos->isModified()) {
-					$affectedRows += $this->aTurnos->save($con);
+			if ($this->aTurno !== null) {
+				if ($this->aTurno->isModified()) {
+					$affectedRows += $this->aTurno->save($con);
 				}
-				$this->setTurnos($this->aTurnos);
+				$this->setTurno($this->aTurno);
 			}
 
 
@@ -326,9 +326,9 @@
 				}
 			}
 
-			if ($this->aTurnos !== null) {
-				if (!$this->aTurnos->validate($columns)) {
-					$failureMap = array_merge($failureMap, $this->aTurnos->getValidationFailures());
+			if ($this->aTurno !== null) {
+				if (!$this->aTurno->validate($columns)) {
+					$failureMap = array_merge($failureMap, $this->aTurno->getValidationFailures());
 				}
 			}
 
@@ -382,7 +382,7 @@
 				return $this->getDescripcion();
 				break;
 			case 3:
-				return $this->getFkTurnosId();
+				return $this->getFkTurnoId();
 				break;
 			case 4:
 				return $this->getOrden();
@@ -400,7 +400,7 @@
 			$keys[0] => $this->getId(),
 			$keys[1] => $this->getFkAnioId(),
 			$keys[2] => $this->getDescripcion(),
-			$keys[3] => $this->getFkTurnosId(),
+			$keys[3] => $this->getFkTurnoId(),
 			$keys[4] => $this->getOrden(),
 		);
 		return $result;
@@ -427,7 +427,7 @@
 				$this->setDescripcion($value);
 				break;
 			case 3:
-				$this->setFkTurnosId($value);
+				$this->setFkTurnoId($value);
 				break;
 			case 4:
 				$this->setOrden($value);
@@ -442,7 +442,7 @@
 		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->setDescripcion($arr[$keys[2]]);
-		if (array_key_exists($keys[3], $arr)) $this->setFkTurnosId($arr[$keys[3]]);
+		if (array_key_exists($keys[3], $arr)) $this->setFkTurnoId($arr[$keys[3]]);
 		if (array_key_exists($keys[4], $arr)) $this->setOrden($arr[$keys[4]]);
 	}
 
@@ -454,7 +454,7 @@
 		if ($this->isColumnModified(DivisionPeer::ID)) $criteria->add(DivisionPeer::ID, $this->id);
 		if ($this->isColumnModified(DivisionPeer::FK_ANIO_ID)) $criteria->add(DivisionPeer::FK_ANIO_ID, $this->fk_anio_id);
 		if ($this->isColumnModified(DivisionPeer::DESCRIPCION)) $criteria->add(DivisionPeer::DESCRIPCION, $this->descripcion);
-		if ($this->isColumnModified(DivisionPeer::FK_TURNOS_ID)) $criteria->add(DivisionPeer::FK_TURNOS_ID, $this->fk_turnos_id);
+		if ($this->isColumnModified(DivisionPeer::FK_TURNO_ID)) $criteria->add(DivisionPeer::FK_TURNO_ID, $this->fk_turno_id);
 		if ($this->isColumnModified(DivisionPeer::ORDEN)) $criteria->add(DivisionPeer::ORDEN, $this->orden);
 
 		return $criteria;
@@ -490,7 +490,7 @@
 
 		$copyObj->setDescripcion($this->descripcion);
 
-		$copyObj->setFkTurnosId($this->fk_turnos_id);
+		$copyObj->setFkTurnoId($this->fk_turno_id);
 
 		$copyObj->setOrden($this->orden);
 
@@ -562,33 +562,33 @@
 	}
 
 	
-	public function setTurnos($v)
+	public function setTurno($v)
 	{
 
 
 		if ($v === null) {
-			$this->setFkTurnosId('0');
+			$this->setFkTurnoId('0');
 		} else {
-			$this->setFkTurnosId($v->getId());
+			$this->setFkTurnoId($v->getId());
 		}
 
 
-		$this->aTurnos = $v;
+		$this->aTurno = $v;
 	}
 
 
 	
-	public function getTurnos($con = null)
+	public function getTurno($con = null)
 	{
-				include_once 'lib/model/om/BaseTurnosPeer.php';
+				include_once 'lib/model/om/BaseTurnoPeer.php';
 
-		if ($this->aTurnos === null && ($this->fk_turnos_id !== null)) {
+		if ($this->aTurno === null && ($this->fk_turno_id !== null)) {
 
-			$this->aTurnos = TurnosPeer::retrieveByPK($this->fk_turnos_id, $con);
+			$this->aTurno = TurnoPeer::retrieveByPK($this->fk_turno_id, $con);
 
 			
 		}
-		return $this->aTurnos;
+		return $this->aTurno;
 	}
 
 	

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseDivisionPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseDivisionPeer.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseDivisionPeer.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -29,7 +29,7 @@
 	const DESCRIPCION = 'division.DESCRIPCION';
 
 	
-	const FK_TURNOS_ID = 'division.FK_TURNOS_ID';
+	const FK_TURNO_ID = 'division.FK_TURNO_ID';
 
 	
 	const ORDEN = 'division.ORDEN';
@@ -40,17 +40,17 @@
 
 	
 	private static $fieldNames = array (
-		BasePeer::TYPE_PHPNAME => array ('Id', 'FkAnioId', 'Descripcion', 'FkTurnosId', 'Orden', ),
-		BasePeer::TYPE_COLNAME => array (DivisionPeer::ID, DivisionPeer::FK_ANIO_ID, DivisionPeer::DESCRIPCION, DivisionPeer::FK_TURNOS_ID, DivisionPeer::ORDEN, ),
-		BasePeer::TYPE_FIELDNAME => array ('id', 'fk_anio_id', 'descripcion', 'fk_turnos_id', 'orden', ),
+		BasePeer::TYPE_PHPNAME => array ('Id', 'FkAnioId', 'Descripcion', 'FkTurnoId', 'Orden', ),
+		BasePeer::TYPE_COLNAME => array (DivisionPeer::ID, DivisionPeer::FK_ANIO_ID, DivisionPeer::DESCRIPCION, DivisionPeer::FK_TURNO_ID, DivisionPeer::ORDEN, ),
+		BasePeer::TYPE_FIELDNAME => array ('id', 'fk_anio_id', 'descripcion', 'fk_turno_id', 'orden', ),
 		BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
 	);
 
 	
 	private static $fieldKeys = array (
-		BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'FkAnioId' => 1, 'Descripcion' => 2, 'FkTurnosId' => 3, 'Orden' => 4, ),
-		BasePeer::TYPE_COLNAME => array (DivisionPeer::ID => 0, DivisionPeer::FK_ANIO_ID => 1, DivisionPeer::DESCRIPCION => 2, DivisionPeer::FK_TURNOS_ID => 3, DivisionPeer::ORDEN => 4, ),
-		BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'fk_anio_id' => 1, 'descripcion' => 2, 'fk_turnos_id' => 3, 'orden' => 4, ),
+		BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'FkAnioId' => 1, 'Descripcion' => 2, 'FkTurnoId' => 3, 'Orden' => 4, ),
+		BasePeer::TYPE_COLNAME => array (DivisionPeer::ID => 0, DivisionPeer::FK_ANIO_ID => 1, DivisionPeer::DESCRIPCION => 2, DivisionPeer::FK_TURNO_ID => 3, DivisionPeer::ORDEN => 4, ),
+		BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'fk_anio_id' => 1, 'descripcion' => 2, 'fk_turno_id' => 3, 'orden' => 4, ),
 		BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
 	);
 
@@ -111,7 +111,7 @@
 
 		$criteria->addSelectColumn(DivisionPeer::DESCRIPCION);
 
-		$criteria->addSelectColumn(DivisionPeer::FK_TURNOS_ID);
+		$criteria->addSelectColumn(DivisionPeer::FK_TURNO_ID);
 
 		$criteria->addSelectColumn(DivisionPeer::ORDEN);
 
@@ -222,7 +222,7 @@
 
 
 	
-	public static function doCountJoinTurnos(Criteria $criteria, $distinct = false, $con = null)
+	public static function doCountJoinTurno(Criteria $criteria, $distinct = false, $con = null)
 	{
 				$criteria = clone $criteria;
 
@@ -238,7 +238,7 @@
 			$criteria->addSelectColumn($column);
 		}
 
-		$criteria->addJoin(DivisionPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$criteria->addJoin(DivisionPeer::FK_TURNO_ID, TurnoPeer::ID);
 
 		$rs = DivisionPeer::doSelectRS($criteria, $con);
 		if ($rs->next()) {
@@ -297,7 +297,7 @@
 
 
 	
-	public static function doSelectJoinTurnos(Criteria $c, $con = null)
+	public static function doSelectJoinTurno(Criteria $c, $con = null)
 	{
 		$c = clone $c;
 
@@ -307,9 +307,9 @@
 
 		DivisionPeer::addSelectColumns($c);
 		$startcol = (DivisionPeer::NUM_COLUMNS - DivisionPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
-		TurnosPeer::addSelectColumns($c);
+		TurnoPeer::addSelectColumns($c);
 
-		$c->addJoin(DivisionPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$c->addJoin(DivisionPeer::FK_TURNO_ID, TurnoPeer::ID);
 		$rs = BasePeer::doSelect($c, $con);
 		$results = array();
 
@@ -321,7 +321,7 @@
 			$obj1 = new $cls();
 			$obj1->hydrate($rs);
 
-			$omClass = TurnosPeer::getOMClass();
+			$omClass = TurnoPeer::getOMClass();
 
 			$cls = Propel::import($omClass);
 			$obj2 = new $cls();
@@ -329,7 +329,7 @@
 
 			$newObject = true;
 			foreach($results as $temp_obj1) {
-				$temp_obj2 = $temp_obj1->getTurnos(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+				$temp_obj2 = $temp_obj1->getTurno(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
 					$newObject = false;
 										$temp_obj2->addDivision($obj1); 					break;
 				}
@@ -362,7 +362,7 @@
 
 		$criteria->addJoin(DivisionPeer::FK_ANIO_ID, AnioPeer::ID);
 
-		$criteria->addJoin(DivisionPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$criteria->addJoin(DivisionPeer::FK_TURNO_ID, TurnoPeer::ID);
 
 		$rs = DivisionPeer::doSelectRS($criteria, $con);
 		if ($rs->next()) {
@@ -388,12 +388,12 @@
 		AnioPeer::addSelectColumns($c);
 		$startcol3 = $startcol2 + AnioPeer::NUM_COLUMNS;
 
-		TurnosPeer::addSelectColumns($c);
-		$startcol4 = $startcol3 + TurnosPeer::NUM_COLUMNS;
+		TurnoPeer::addSelectColumns($c);
+		$startcol4 = $startcol3 + TurnoPeer::NUM_COLUMNS;
 
 		$c->addJoin(DivisionPeer::FK_ANIO_ID, AnioPeer::ID);
 
-		$c->addJoin(DivisionPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$c->addJoin(DivisionPeer::FK_TURNO_ID, TurnoPeer::ID);
 
 		$rs = BasePeer::doSelect($c, $con);
 		$results = array();
@@ -432,7 +432,7 @@
 
 
 					
-			$omClass = TurnosPeer::getOMClass();
+			$omClass = TurnoPeer::getOMClass();
 
 
 			$cls = Propel::import($omClass);
@@ -442,7 +442,7 @@
 			$newObject = true;
 			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
 				$temp_obj1 = $results[$j];
-				$temp_obj3 = $temp_obj1->getTurnos(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+				$temp_obj3 = $temp_obj1->getTurno(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
 					$newObject = false;
 					$temp_obj3->addDivision($obj1); 					break;
 				}
@@ -476,7 +476,7 @@
 			$criteria->addSelectColumn($column);
 		}
 
-		$criteria->addJoin(DivisionPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$criteria->addJoin(DivisionPeer::FK_TURNO_ID, TurnoPeer::ID);
 
 		$rs = DivisionPeer::doSelectRS($criteria, $con);
 		if ($rs->next()) {
@@ -488,7 +488,7 @@
 
 
 	
-	public static function doCountJoinAllExceptTurnos(Criteria $criteria, $distinct = false, $con = null)
+	public static function doCountJoinAllExceptTurno(Criteria $criteria, $distinct = false, $con = null)
 	{
 				$criteria = clone $criteria;
 
@@ -527,10 +527,10 @@
 		DivisionPeer::addSelectColumns($c);
 		$startcol2 = (DivisionPeer::NUM_COLUMNS - DivisionPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
 
-		TurnosPeer::addSelectColumns($c);
-		$startcol3 = $startcol2 + TurnosPeer::NUM_COLUMNS;
+		TurnoPeer::addSelectColumns($c);
+		$startcol3 = $startcol2 + TurnoPeer::NUM_COLUMNS;
 
-		$c->addJoin(DivisionPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$c->addJoin(DivisionPeer::FK_TURNO_ID, TurnoPeer::ID);
 
 
 		$rs = BasePeer::doSelect($c, $con);
@@ -544,7 +544,7 @@
 			$obj1 = new $cls();
 			$obj1->hydrate($rs);
 
-			$omClass = TurnosPeer::getOMClass();
+			$omClass = TurnoPeer::getOMClass();
 
 
 			$cls = Propel::import($omClass);
@@ -554,7 +554,7 @@
 			$newObject = true;
 			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
 				$temp_obj1 = $results[$j];
-				$temp_obj2 = $temp_obj1->getTurnos(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+				$temp_obj2 = $temp_obj1->getTurno(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
 					$newObject = false;
 					$temp_obj2->addDivision($obj1);
 					break;
@@ -573,7 +573,7 @@
 
 
 	
-	public static function doSelectJoinAllExceptTurnos(Criteria $c, $con = null)
+	public static function doSelectJoinAllExceptTurno(Criteria $c, $con = null)
 	{
 		$c = clone $c;
 

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseEstablecimiento.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseEstablecimiento.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseEstablecimiento.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -1869,7 +1869,7 @@
 
 
 	
-	public function getHorarioescolarsJoinTurnos($criteria = null, $con = null)
+	public function getHorarioescolarsJoinTurno($criteria = null, $con = null)
 	{
 				include_once 'lib/model/om/BaseHorarioescolarPeer.php';
 		if ($criteria === null) {
@@ -1887,14 +1887,14 @@
 
 				$criteria->add(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, $this->getId());
 
-				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinTurnos($criteria, $con);
+				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinTurno($criteria, $con);
 			}
 		} else {
 									
 			$criteria->add(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, $this->getId());
 
 			if (!isset($this->lastHorarioescolarCriteria) || !$this->lastHorarioescolarCriteria->equals($criteria)) {
-				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinTurnos($criteria, $con);
+				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinTurno($criteria, $con);
 			}
 		}
 		$this->lastHorarioescolarCriteria = $criteria;

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseEvento.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseEvento.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseEvento.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -1126,7 +1126,7 @@
 
 
 	
-	public function getHorarioescolarsJoinTurnos($criteria = null, $con = null)
+	public function getHorarioescolarsJoinTurno($criteria = null, $con = null)
 	{
 				include_once 'lib/model/om/BaseHorarioescolarPeer.php';
 		if ($criteria === null) {
@@ -1144,14 +1144,14 @@
 
 				$criteria->add(HorarioescolarPeer::FK_EVENTO_ID, $this->getId());
 
-				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinTurnos($criteria, $con);
+				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinTurno($criteria, $con);
 			}
 		} else {
 									
 			$criteria->add(HorarioescolarPeer::FK_EVENTO_ID, $this->getId());
 
 			if (!isset($this->lastHorarioescolarCriteria) || !$this->lastHorarioescolarCriteria->equals($criteria)) {
-				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinTurnos($criteria, $con);
+				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinTurno($criteria, $con);
 			}
 		}
 		$this->lastHorarioescolarCriteria = $criteria;

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolar.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolar.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolar.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -29,7 +29,7 @@
 
 
 	
-	protected $fk_turnos_id = 0;
+	protected $fk_turno_id = 0;
 
 
 	
@@ -42,7 +42,7 @@
 	protected $aEstablecimiento;
 
 	
-	protected $aTurnos;
+	protected $aTurno;
 
 	
 	protected $aHorarioescolartipo;
@@ -89,10 +89,10 @@
 	}
 
 	
-	public function getFkTurnosId()
+	public function getFkTurnoId()
 	{
 
-		return $this->fk_turnos_id;
+		return $this->fk_turno_id;
 	}
 
 	
@@ -181,20 +181,20 @@
 
 	} 
 	
-	public function setFkTurnosId($v)
+	public function setFkTurnoId($v)
 	{
 
 						if ($v !== null && !is_int($v) && is_numeric($v)) {
 			$v = (int) $v;
 		}
 
-		if ($this->fk_turnos_id !== $v || $v === 0) {
-			$this->fk_turnos_id = $v;
-			$this->modifiedColumns[] = HorarioescolarPeer::FK_TURNOS_ID;
+		if ($this->fk_turno_id !== $v || $v === 0) {
+			$this->fk_turno_id = $v;
+			$this->modifiedColumns[] = HorarioescolarPeer::FK_TURNO_ID;
 		}
 
-		if ($this->aTurnos !== null && $this->aTurnos->getId() !== $v) {
-			$this->aTurnos = null;
+		if ($this->aTurno !== null && $this->aTurno->getId() !== $v) {
+			$this->aTurno = null;
 		}
 
 	} 
@@ -231,7 +231,7 @@
 
 			$this->fk_establecimiento_id = $rs->getInt($startcol + 4);
 
-			$this->fk_turnos_id = $rs->getInt($startcol + 5);
+			$this->fk_turno_id = $rs->getInt($startcol + 5);
 
 			$this->fk_horarioescolartipo_id = $rs->getInt($startcol + 6);
 
@@ -311,11 +311,11 @@
 				$this->setEstablecimiento($this->aEstablecimiento);
 			}
 
-			if ($this->aTurnos !== null) {
-				if ($this->aTurnos->isModified()) {
-					$affectedRows += $this->aTurnos->save($con);
+			if ($this->aTurno !== null) {
+				if ($this->aTurno->isModified()) {
+					$affectedRows += $this->aTurno->save($con);
 				}
-				$this->setTurnos($this->aTurnos);
+				$this->setTurno($this->aTurno);
 			}
 
 			if ($this->aHorarioescolartipo !== null) {
@@ -386,9 +386,9 @@
 				}
 			}
 
-			if ($this->aTurnos !== null) {
-				if (!$this->aTurnos->validate($columns)) {
-					$failureMap = array_merge($failureMap, $this->aTurnos->getValidationFailures());
+			if ($this->aTurno !== null) {
+				if (!$this->aTurno->validate($columns)) {
+					$failureMap = array_merge($failureMap, $this->aTurno->getValidationFailures());
 				}
 			}
 
@@ -438,7 +438,7 @@
 				return $this->getFkEstablecimientoId();
 				break;
 			case 5:
-				return $this->getFkTurnosId();
+				return $this->getFkTurnoId();
 				break;
 			case 6:
 				return $this->getFkHorarioescolartipoId();
@@ -458,7 +458,7 @@
 			$keys[2] => $this->getDescripcion(),
 			$keys[3] => $this->getFkEventoId(),
 			$keys[4] => $this->getFkEstablecimientoId(),
-			$keys[5] => $this->getFkTurnosId(),
+			$keys[5] => $this->getFkTurnoId(),
 			$keys[6] => $this->getFkHorarioescolartipoId(),
 		);
 		return $result;
@@ -491,7 +491,7 @@
 				$this->setFkEstablecimientoId($value);
 				break;
 			case 5:
-				$this->setFkTurnosId($value);
+				$this->setFkTurnoId($value);
 				break;
 			case 6:
 				$this->setFkHorarioescolartipoId($value);
@@ -508,7 +508,7 @@
 		if (array_key_exists($keys[2], $arr)) $this->setDescripcion($arr[$keys[2]]);
 		if (array_key_exists($keys[3], $arr)) $this->setFkEventoId($arr[$keys[3]]);
 		if (array_key_exists($keys[4], $arr)) $this->setFkEstablecimientoId($arr[$keys[4]]);
-		if (array_key_exists($keys[5], $arr)) $this->setFkTurnosId($arr[$keys[5]]);
+		if (array_key_exists($keys[5], $arr)) $this->setFkTurnoId($arr[$keys[5]]);
 		if (array_key_exists($keys[6], $arr)) $this->setFkHorarioescolartipoId($arr[$keys[6]]);
 	}
 
@@ -522,7 +522,7 @@
 		if ($this->isColumnModified(HorarioescolarPeer::DESCRIPCION)) $criteria->add(HorarioescolarPeer::DESCRIPCION, $this->descripcion);
 		if ($this->isColumnModified(HorarioescolarPeer::FK_EVENTO_ID)) $criteria->add(HorarioescolarPeer::FK_EVENTO_ID, $this->fk_evento_id);
 		if ($this->isColumnModified(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID)) $criteria->add(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, $this->fk_establecimiento_id);
-		if ($this->isColumnModified(HorarioescolarPeer::FK_TURNOS_ID)) $criteria->add(HorarioescolarPeer::FK_TURNOS_ID, $this->fk_turnos_id);
+		if ($this->isColumnModified(HorarioescolarPeer::FK_TURNO_ID)) $criteria->add(HorarioescolarPeer::FK_TURNO_ID, $this->fk_turno_id);
 		if ($this->isColumnModified(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID)) $criteria->add(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, $this->fk_horarioescolartipo_id);
 
 		return $criteria;
@@ -562,7 +562,7 @@
 
 		$copyObj->setFkEstablecimientoId($this->fk_establecimiento_id);
 
-		$copyObj->setFkTurnosId($this->fk_turnos_id);
+		$copyObj->setFkTurnoId($this->fk_turno_id);
 
 		$copyObj->setFkHorarioescolartipoId($this->fk_horarioescolartipo_id);
 
@@ -651,33 +651,33 @@
 	}
 
 	
-	public function setTurnos($v)
+	public function setTurno($v)
 	{
 
 
 		if ($v === null) {
-			$this->setFkTurnosId('0');
+			$this->setFkTurnoId('0');
 		} else {
-			$this->setFkTurnosId($v->getId());
+			$this->setFkTurnoId($v->getId());
 		}
 
 
-		$this->aTurnos = $v;
+		$this->aTurno = $v;
 	}
 
 
 	
-	public function getTurnos($con = null)
+	public function getTurno($con = null)
 	{
-				include_once 'lib/model/om/BaseTurnosPeer.php';
+				include_once 'lib/model/om/BaseTurnoPeer.php';
 
-		if ($this->aTurnos === null && ($this->fk_turnos_id !== null)) {
+		if ($this->aTurno === null && ($this->fk_turno_id !== null)) {
 
-			$this->aTurnos = TurnosPeer::retrieveByPK($this->fk_turnos_id, $con);
+			$this->aTurno = TurnoPeer::retrieveByPK($this->fk_turno_id, $con);
 
 			
 		}
-		return $this->aTurnos;
+		return $this->aTurno;
 	}
 
 	

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolarPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolarPeer.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolarPeer.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -35,7 +35,7 @@
 	const FK_ESTABLECIMIENTO_ID = 'horarioescolar.FK_ESTABLECIMIENTO_ID';
 
 	
-	const FK_TURNOS_ID = 'horarioescolar.FK_TURNOS_ID';
+	const FK_TURNO_ID = 'horarioescolar.FK_TURNO_ID';
 
 	
 	const FK_HORARIOESCOLARTIPO_ID = 'horarioescolar.FK_HORARIOESCOLARTIPO_ID';
@@ -46,17 +46,17 @@
 
 	
 	private static $fieldNames = array (
-		BasePeer::TYPE_PHPNAME => array ('Id', 'Nombre', 'Descripcion', 'FkEventoId', 'FkEstablecimientoId', 'FkTurnosId', 'FkHorarioescolartipoId', ),
-		BasePeer::TYPE_COLNAME => array (HorarioescolarPeer::ID, HorarioescolarPeer::NOMBRE, HorarioescolarPeer::DESCRIPCION, HorarioescolarPeer::FK_EVENTO_ID, HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, HorarioescolarPeer::FK_TURNOS_ID, HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, ),
-		BasePeer::TYPE_FIELDNAME => array ('id', 'nombre', 'descripcion', 'fk_evento_id', 'fk_establecimiento_id', 'fk_turnos_id', 'fk_horarioescolartipo_id', ),
+		BasePeer::TYPE_PHPNAME => array ('Id', 'Nombre', 'Descripcion', 'FkEventoId', 'FkEstablecimientoId', 'FkTurnoId', 'FkHorarioescolartipoId', ),
+		BasePeer::TYPE_COLNAME => array (HorarioescolarPeer::ID, HorarioescolarPeer::NOMBRE, HorarioescolarPeer::DESCRIPCION, HorarioescolarPeer::FK_EVENTO_ID, HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, HorarioescolarPeer::FK_TURNO_ID, HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, ),
+		BasePeer::TYPE_FIELDNAME => array ('id', 'nombre', 'descripcion', 'fk_evento_id', 'fk_establecimiento_id', 'fk_turno_id', 'fk_horarioescolartipo_id', ),
 		BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
 	);
 
 	
 	private static $fieldKeys = array (
-		BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Nombre' => 1, 'Descripcion' => 2, 'FkEventoId' => 3, 'FkEstablecimientoId' => 4, 'FkTurnosId' => 5, 'FkHorarioescolartipoId' => 6, ),
-		BasePeer::TYPE_COLNAME => array (HorarioescolarPeer::ID => 0, HorarioescolarPeer::NOMBRE => 1, HorarioescolarPeer::DESCRIPCION => 2, HorarioescolarPeer::FK_EVENTO_ID => 3, HorarioescolarPeer::FK_ESTABLECIMIENTO_ID => 4, HorarioescolarPeer::FK_TURNOS_ID => 5, HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID => 6, ),
-		BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'nombre' => 1, 'descripcion' => 2, 'fk_evento_id' => 3, 'fk_establecimiento_id' => 4, 'fk_turnos_id' => 5, 'fk_horarioescolartipo_id' => 6, ),
+		BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Nombre' => 1, 'Descripcion' => 2, 'FkEventoId' => 3, 'FkEstablecimientoId' => 4, 'FkTurnoId' => 5, 'FkHorarioescolartipoId' => 6, ),
+		BasePeer::TYPE_COLNAME => array (HorarioescolarPeer::ID => 0, HorarioescolarPeer::NOMBRE => 1, HorarioescolarPeer::DESCRIPCION => 2, HorarioescolarPeer::FK_EVENTO_ID => 3, HorarioescolarPeer::FK_ESTABLECIMIENTO_ID => 4, HorarioescolarPeer::FK_TURNO_ID => 5, HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID => 6, ),
+		BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'nombre' => 1, 'descripcion' => 2, 'fk_evento_id' => 3, 'fk_establecimiento_id' => 4, 'fk_turno_id' => 5, 'fk_horarioescolartipo_id' => 6, ),
 		BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
 	);
 
@@ -121,7 +121,7 @@
 
 		$criteria->addSelectColumn(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID);
 
-		$criteria->addSelectColumn(HorarioescolarPeer::FK_TURNOS_ID);
+		$criteria->addSelectColumn(HorarioescolarPeer::FK_TURNO_ID);
 
 		$criteria->addSelectColumn(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID);
 
@@ -260,7 +260,7 @@
 
 
 	
-	public static function doCountJoinTurnos(Criteria $criteria, $distinct = false, $con = null)
+	public static function doCountJoinTurno(Criteria $criteria, $distinct = false, $con = null)
 	{
 				$criteria = clone $criteria;
 
@@ -276,7 +276,7 @@
 			$criteria->addSelectColumn($column);
 		}
 
-		$criteria->addJoin(HorarioescolarPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$criteria->addJoin(HorarioescolarPeer::FK_TURNO_ID, TurnoPeer::ID);
 
 		$rs = HorarioescolarPeer::doSelectRS($criteria, $con);
 		if ($rs->next()) {
@@ -410,7 +410,7 @@
 
 
 	
-	public static function doSelectJoinTurnos(Criteria $c, $con = null)
+	public static function doSelectJoinTurno(Criteria $c, $con = null)
 	{
 		$c = clone $c;
 
@@ -420,9 +420,9 @@
 
 		HorarioescolarPeer::addSelectColumns($c);
 		$startcol = (HorarioescolarPeer::NUM_COLUMNS - HorarioescolarPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
-		TurnosPeer::addSelectColumns($c);
+		TurnoPeer::addSelectColumns($c);
 
-		$c->addJoin(HorarioescolarPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$c->addJoin(HorarioescolarPeer::FK_TURNO_ID, TurnoPeer::ID);
 		$rs = BasePeer::doSelect($c, $con);
 		$results = array();
 
@@ -434,7 +434,7 @@
 			$obj1 = new $cls();
 			$obj1->hydrate($rs);
 
-			$omClass = TurnosPeer::getOMClass();
+			$omClass = TurnoPeer::getOMClass();
 
 			$cls = Propel::import($omClass);
 			$obj2 = new $cls();
@@ -442,7 +442,7 @@
 
 			$newObject = true;
 			foreach($results as $temp_obj1) {
-				$temp_obj2 = $temp_obj1->getTurnos(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+				$temp_obj2 = $temp_obj1->getTurno(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
 					$newObject = false;
 										$temp_obj2->addHorarioescolar($obj1); 					break;
 				}
@@ -524,7 +524,7 @@
 
 		$criteria->addJoin(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, EstablecimientoPeer::ID);
 
-		$criteria->addJoin(HorarioescolarPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$criteria->addJoin(HorarioescolarPeer::FK_TURNO_ID, TurnoPeer::ID);
 
 		$criteria->addJoin(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, HorarioescolartipoPeer::ID);
 
@@ -555,8 +555,8 @@
 		EstablecimientoPeer::addSelectColumns($c);
 		$startcol4 = $startcol3 + EstablecimientoPeer::NUM_COLUMNS;
 
-		TurnosPeer::addSelectColumns($c);
-		$startcol5 = $startcol4 + TurnosPeer::NUM_COLUMNS;
+		TurnoPeer::addSelectColumns($c);
+		$startcol5 = $startcol4 + TurnoPeer::NUM_COLUMNS;
 
 		HorarioescolartipoPeer::addSelectColumns($c);
 		$startcol6 = $startcol5 + HorarioescolartipoPeer::NUM_COLUMNS;
@@ -565,7 +565,7 @@
 
 		$c->addJoin(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, EstablecimientoPeer::ID);
 
-		$c->addJoin(HorarioescolarPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$c->addJoin(HorarioescolarPeer::FK_TURNO_ID, TurnoPeer::ID);
 
 		$c->addJoin(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, HorarioescolartipoPeer::ID);
 
@@ -629,7 +629,7 @@
 
 
 					
-			$omClass = TurnosPeer::getOMClass();
+			$omClass = TurnoPeer::getOMClass();
 
 
 			$cls = Propel::import($omClass);
@@ -639,7 +639,7 @@
 			$newObject = true;
 			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
 				$temp_obj1 = $results[$j];
-				$temp_obj4 = $temp_obj1->getTurnos(); 				if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
+				$temp_obj4 = $temp_obj1->getTurno(); 				if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
 					$newObject = false;
 					$temp_obj4->addHorarioescolar($obj1); 					break;
 				}
@@ -698,7 +698,7 @@
 
 		$criteria->addJoin(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, EstablecimientoPeer::ID);
 
-		$criteria->addJoin(HorarioescolarPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$criteria->addJoin(HorarioescolarPeer::FK_TURNO_ID, TurnoPeer::ID);
 
 		$criteria->addJoin(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, HorarioescolartipoPeer::ID);
 
@@ -730,7 +730,7 @@
 
 		$criteria->addJoin(HorarioescolarPeer::FK_EVENTO_ID, EventoPeer::ID);
 
-		$criteria->addJoin(HorarioescolarPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$criteria->addJoin(HorarioescolarPeer::FK_TURNO_ID, TurnoPeer::ID);
 
 		$criteria->addJoin(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, HorarioescolartipoPeer::ID);
 
@@ -744,7 +744,7 @@
 
 
 	
-	public static function doCountJoinAllExceptTurnos(Criteria $criteria, $distinct = false, $con = null)
+	public static function doCountJoinAllExceptTurno(Criteria $criteria, $distinct = false, $con = null)
 	{
 				$criteria = clone $criteria;
 
@@ -796,7 +796,7 @@
 
 		$criteria->addJoin(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, EstablecimientoPeer::ID);
 
-		$criteria->addJoin(HorarioescolarPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$criteria->addJoin(HorarioescolarPeer::FK_TURNO_ID, TurnoPeer::ID);
 
 		$rs = HorarioescolarPeer::doSelectRS($criteria, $con);
 		if ($rs->next()) {
@@ -822,15 +822,15 @@
 		EstablecimientoPeer::addSelectColumns($c);
 		$startcol3 = $startcol2 + EstablecimientoPeer::NUM_COLUMNS;
 
-		TurnosPeer::addSelectColumns($c);
-		$startcol4 = $startcol3 + TurnosPeer::NUM_COLUMNS;
+		TurnoPeer::addSelectColumns($c);
+		$startcol4 = $startcol3 + TurnoPeer::NUM_COLUMNS;
 
 		HorarioescolartipoPeer::addSelectColumns($c);
 		$startcol5 = $startcol4 + HorarioescolartipoPeer::NUM_COLUMNS;
 
 		$c->addJoin(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, EstablecimientoPeer::ID);
 
-		$c->addJoin(HorarioescolarPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$c->addJoin(HorarioescolarPeer::FK_TURNO_ID, TurnoPeer::ID);
 
 		$c->addJoin(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, HorarioescolartipoPeer::ID);
 
@@ -868,7 +868,7 @@
 				$obj2->addHorarioescolar($obj1);
 			}
 
-			$omClass = TurnosPeer::getOMClass();
+			$omClass = TurnoPeer::getOMClass();
 
 
 			$cls = Propel::import($omClass);
@@ -878,7 +878,7 @@
 			$newObject = true;
 			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
 				$temp_obj1 = $results[$j];
-				$temp_obj3 = $temp_obj1->getTurnos(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+				$temp_obj3 = $temp_obj1->getTurno(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
 					$newObject = false;
 					$temp_obj3->addHorarioescolar($obj1);
 					break;
@@ -933,15 +933,15 @@
 		EventoPeer::addSelectColumns($c);
 		$startcol3 = $startcol2 + EventoPeer::NUM_COLUMNS;
 
-		TurnosPeer::addSelectColumns($c);
-		$startcol4 = $startcol3 + TurnosPeer::NUM_COLUMNS;
+		TurnoPeer::addSelectColumns($c);
+		$startcol4 = $startcol3 + TurnoPeer::NUM_COLUMNS;
 
 		HorarioescolartipoPeer::addSelectColumns($c);
 		$startcol5 = $startcol4 + HorarioescolartipoPeer::NUM_COLUMNS;
 
 		$c->addJoin(HorarioescolarPeer::FK_EVENTO_ID, EventoPeer::ID);
 
-		$c->addJoin(HorarioescolarPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$c->addJoin(HorarioescolarPeer::FK_TURNO_ID, TurnoPeer::ID);
 
 		$c->addJoin(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, HorarioescolartipoPeer::ID);
 
@@ -979,7 +979,7 @@
 				$obj2->addHorarioescolar($obj1);
 			}
 
-			$omClass = TurnosPeer::getOMClass();
+			$omClass = TurnoPeer::getOMClass();
 
 
 			$cls = Propel::import($omClass);
@@ -989,7 +989,7 @@
 			$newObject = true;
 			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
 				$temp_obj1 = $results[$j];
-				$temp_obj3 = $temp_obj1->getTurnos(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+				$temp_obj3 = $temp_obj1->getTurno(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
 					$newObject = false;
 					$temp_obj3->addHorarioescolar($obj1);
 					break;
@@ -1030,7 +1030,7 @@
 
 
 	
-	public static function doSelectJoinAllExceptTurnos(Criteria $c, $con = null)
+	public static function doSelectJoinAllExceptTurno(Criteria $c, $con = null)
 	{
 		$c = clone $c;
 
@@ -1158,14 +1158,14 @@
 		EstablecimientoPeer::addSelectColumns($c);
 		$startcol4 = $startcol3 + EstablecimientoPeer::NUM_COLUMNS;
 
-		TurnosPeer::addSelectColumns($c);
-		$startcol5 = $startcol4 + TurnosPeer::NUM_COLUMNS;
+		TurnoPeer::addSelectColumns($c);
+		$startcol5 = $startcol4 + TurnoPeer::NUM_COLUMNS;
 
 		$c->addJoin(HorarioescolarPeer::FK_EVENTO_ID, EventoPeer::ID);
 
 		$c->addJoin(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, EstablecimientoPeer::ID);
 
-		$c->addJoin(HorarioescolarPeer::FK_TURNOS_ID, TurnosPeer::ID);
+		$c->addJoin(HorarioescolarPeer::FK_TURNO_ID, TurnoPeer::ID);
 
 
 		$rs = BasePeer::doSelect($c, $con);
@@ -1223,7 +1223,7 @@
 				$obj3->addHorarioescolar($obj1);
 			}
 
-			$omClass = TurnosPeer::getOMClass();
+			$omClass = TurnoPeer::getOMClass();
 
 
 			$cls = Propel::import($omClass);
@@ -1233,7 +1233,7 @@
 			$newObject = true;
 			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
 				$temp_obj1 = $results[$j];
-				$temp_obj4 = $temp_obj1->getTurnos(); 				if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
+				$temp_obj4 = $temp_obj1->getTurno(); 				if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
 					$newObject = false;
 					$temp_obj4->addHorarioescolar($obj1);
 					break;

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolartipo.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolartipo.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolartipo.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -527,7 +527,7 @@
 
 
 	
-	public function getHorarioescolarsJoinTurnos($criteria = null, $con = null)
+	public function getHorarioescolarsJoinTurno($criteria = null, $con = null)
 	{
 				include_once 'lib/model/om/BaseHorarioescolarPeer.php';
 		if ($criteria === null) {
@@ -545,14 +545,14 @@
 
 				$criteria->add(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, $this->getId());
 
-				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinTurnos($criteria, $con);
+				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinTurno($criteria, $con);
 			}
 		} else {
 									
 			$criteria->add(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, $this->getId());
 
 			if (!isset($this->lastHorarioescolarCriteria) || !$this->lastHorarioescolarCriteria->equals($criteria)) {
-				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinTurnos($criteria, $con);
+				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinTurno($criteria, $con);
 			}
 		}
 		$this->lastHorarioescolarCriteria = $criteria;

Added: prosistem/alba/trunk/alba/lib/model/om/BaseTurno.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseTurno.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseTurno.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -0,0 +1,860 @@
+<?php
+
+
+abstract class BaseTurno extends BaseObject  implements Persistent {
+
+
+	
+	protected static $peer;
+
+
+	
+	protected $id;
+
+
+	
+	protected $fk_ciclolectivo_id;
+
+
+	
+	protected $hora_inicio;
+
+
+	
+	protected $hora_fin;
+
+
+	
+	protected $descripcion = 'null';
+
+	
+	protected $aCiclolectivo;
+
+	
+	protected $collDivisions;
+
+	
+	protected $lastDivisionCriteria = null;
+
+	
+	protected $collHorarioescolars;
+
+	
+	protected $lastHorarioescolarCriteria = null;
+
+	
+	protected $alreadyInSave = false;
+
+	
+	protected $alreadyInValidation = false;
+
+	
+	public function getId()
+	{
+
+		return $this->id;
+	}
+
+	
+	public function getFkCiclolectivoId()
+	{
+
+		return $this->fk_ciclolectivo_id;
+	}
+
+	
+	public function getHoraInicio($format = 'H:i:s')
+	{
+
+		if ($this->hora_inicio === null || $this->hora_inicio === '') {
+			return null;
+		} elseif (!is_int($this->hora_inicio)) {
+						$ts = strtotime($this->hora_inicio);
+			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [hora_inicio] as date/time value: " . var_export($this->hora_inicio, true));
+			}
+		} else {
+			$ts = $this->hora_inicio;
+		}
+		if ($format === null) {
+			return $ts;
+		} elseif (strpos($format, '%') !== false) {
+			return strftime($format, $ts);
+		} else {
+			return date($format, $ts);
+		}
+	}
+
+	
+	public function getHoraFin($format = 'H:i:s')
+	{
+
+		if ($this->hora_fin === null || $this->hora_fin === '') {
+			return null;
+		} elseif (!is_int($this->hora_fin)) {
+						$ts = strtotime($this->hora_fin);
+			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [hora_fin] as date/time value: " . var_export($this->hora_fin, true));
+			}
+		} else {
+			$ts = $this->hora_fin;
+		}
+		if ($format === null) {
+			return $ts;
+		} elseif (strpos($format, '%') !== false) {
+			return strftime($format, $ts);
+		} else {
+			return date($format, $ts);
+		}
+	}
+
+	
+	public function getDescripcion()
+	{
+
+		return $this->descripcion;
+	}
+
+	
+	public function setId($v)
+	{
+
+						if ($v !== null && !is_int($v) && is_numeric($v)) {
+			$v = (int) $v;
+		}
+
+		if ($this->id !== $v) {
+			$this->id = $v;
+			$this->modifiedColumns[] = TurnoPeer::ID;
+		}
+
+	} 
+	
+	public function setFkCiclolectivoId($v)
+	{
+
+						if ($v !== null && !is_int($v) && is_numeric($v)) {
+			$v = (int) $v;
+		}
+
+		if ($this->fk_ciclolectivo_id !== $v) {
+			$this->fk_ciclolectivo_id = $v;
+			$this->modifiedColumns[] = TurnoPeer::FK_CICLOLECTIVO_ID;
+		}
+
+		if ($this->aCiclolectivo !== null && $this->aCiclolectivo->getId() !== $v) {
+			$this->aCiclolectivo = null;
+		}
+
+	} 
+	
+	public function setHoraInicio($v)
+	{
+
+		if ($v !== null && !is_int($v)) {
+			$ts = strtotime($v);
+			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [hora_inicio] from input: " . var_export($v, true));
+			}
+		} else {
+			$ts = $v;
+		}
+		if ($this->hora_inicio !== $ts) {
+			$this->hora_inicio = $ts;
+			$this->modifiedColumns[] = TurnoPeer::HORA_INICIO;
+		}
+
+	} 
+	
+	public function setHoraFin($v)
+	{
+
+		if ($v !== null && !is_int($v)) {
+			$ts = strtotime($v);
+			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [hora_fin] from input: " . var_export($v, true));
+			}
+		} else {
+			$ts = $v;
+		}
+		if ($this->hora_fin !== $ts) {
+			$this->hora_fin = $ts;
+			$this->modifiedColumns[] = TurnoPeer::HORA_FIN;
+		}
+
+	} 
+	
+	public function setDescripcion($v)
+	{
+
+						if ($v !== null && !is_string($v)) {
+			$v = (string) $v; 
+		}
+
+		if ($this->descripcion !== $v || $v === 'null') {
+			$this->descripcion = $v;
+			$this->modifiedColumns[] = TurnoPeer::DESCRIPCION;
+		}
+
+	} 
+	
+	public function hydrate(ResultSet $rs, $startcol = 1)
+	{
+		try {
+
+			$this->id = $rs->getInt($startcol + 0);
+
+			$this->fk_ciclolectivo_id = $rs->getInt($startcol + 1);
+
+			$this->hora_inicio = $rs->getTime($startcol + 2, null);
+
+			$this->hora_fin = $rs->getTime($startcol + 3, null);
+
+			$this->descripcion = $rs->getString($startcol + 4);
+
+			$this->resetModified();
+
+			$this->setNew(false);
+
+						return $startcol + 5; 
+		} catch (Exception $e) {
+			throw new PropelException("Error populating Turno object", $e);
+		}
+	}
+
+	
+	public function delete($con = null)
+	{
+		if ($this->isDeleted()) {
+			throw new PropelException("This object has already been deleted.");
+		}
+
+		if ($con === null) {
+			$con = Propel::getConnection(TurnoPeer::DATABASE_NAME);
+		}
+
+		try {
+			$con->begin();
+			TurnoPeer::doDelete($this, $con);
+			$this->setDeleted(true);
+			$con->commit();
+		} catch (PropelException $e) {
+			$con->rollback();
+			throw $e;
+		}
+	}
+
+	
+	public function save($con = null)
+	{
+		if ($this->isDeleted()) {
+			throw new PropelException("You cannot save an object that has been deleted.");
+		}
+
+		if ($con === null) {
+			$con = Propel::getConnection(TurnoPeer::DATABASE_NAME);
+		}
+
+		try {
+			$con->begin();
+			$affectedRows = $this->doSave($con);
+			$con->commit();
+			return $affectedRows;
+		} catch (PropelException $e) {
+			$con->rollback();
+			throw $e;
+		}
+	}
+
+	
+	protected function doSave($con)
+	{
+		$affectedRows = 0; 		if (!$this->alreadyInSave) {
+			$this->alreadyInSave = true;
+
+
+												
+			if ($this->aCiclolectivo !== null) {
+				if ($this->aCiclolectivo->isModified()) {
+					$affectedRows += $this->aCiclolectivo->save($con);
+				}
+				$this->setCiclolectivo($this->aCiclolectivo);
+			}
+
+
+						if ($this->isModified()) {
+				if ($this->isNew()) {
+					$pk = TurnoPeer::doInsert($this, $con);
+					$affectedRows += 1; 										 										 
+					$this->setId($pk);  
+					$this->setNew(false);
+				} else {
+					$affectedRows += TurnoPeer::doUpdate($this, $con);
+				}
+				$this->resetModified(); 			}
+
+			if ($this->collDivisions !== null) {
+				foreach($this->collDivisions as $referrerFK) {
+					if (!$referrerFK->isDeleted()) {
+						$affectedRows += $referrerFK->save($con);
+					}
+				}
+			}
+
+			if ($this->collHorarioescolars !== null) {
+				foreach($this->collHorarioescolars as $referrerFK) {
+					if (!$referrerFK->isDeleted()) {
+						$affectedRows += $referrerFK->save($con);
+					}
+				}
+			}
+
+			$this->alreadyInSave = false;
+		}
+		return $affectedRows;
+	} 
+	
+	protected $validationFailures = array();
+
+	
+	public function getValidationFailures()
+	{
+		return $this->validationFailures;
+	}
+
+	
+	public function validate($columns = null)
+	{
+		$res = $this->doValidate($columns);
+		if ($res === true) {
+			$this->validationFailures = array();
+			return true;
+		} else {
+			$this->validationFailures = $res;
+			return false;
+		}
+	}
+
+	
+	protected function doValidate($columns = null)
+	{
+		if (!$this->alreadyInValidation) {
+			$this->alreadyInValidation = true;
+			$retval = null;
+
+			$failureMap = array();
+
+
+												
+			if ($this->aCiclolectivo !== null) {
+				if (!$this->aCiclolectivo->validate($columns)) {
+					$failureMap = array_merge($failureMap, $this->aCiclolectivo->getValidationFailures());
+				}
+			}
+
+
+			if (($retval = TurnoPeer::doValidate($this, $columns)) !== true) {
+				$failureMap = array_merge($failureMap, $retval);
+			}
+
+
+				if ($this->collDivisions !== null) {
+					foreach($this->collDivisions as $referrerFK) {
+						if (!$referrerFK->validate($columns)) {
+							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+						}
+					}
+				}
+
+				if ($this->collHorarioescolars !== null) {
+					foreach($this->collHorarioescolars as $referrerFK) {
+						if (!$referrerFK->validate($columns)) {
+							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+						}
+					}
+				}
+
+
+			$this->alreadyInValidation = false;
+		}
+
+		return (!empty($failureMap) ? $failureMap : true);
+	}
+
+	
+	public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
+	{
+		$pos = TurnoPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+		return $this->getByPosition($pos);
+	}
+
+	
+	public function getByPosition($pos)
+	{
+		switch($pos) {
+			case 0:
+				return $this->getId();
+				break;
+			case 1:
+				return $this->getFkCiclolectivoId();
+				break;
+			case 2:
+				return $this->getHoraInicio();
+				break;
+			case 3:
+				return $this->getHoraFin();
+				break;
+			case 4:
+				return $this->getDescripcion();
+				break;
+			default:
+				return null;
+				break;
+		} 	}
+
+	
+	public function toArray($keyType = BasePeer::TYPE_PHPNAME)
+	{
+		$keys = TurnoPeer::getFieldNames($keyType);
+		$result = array(
+			$keys[0] => $this->getId(),
+			$keys[1] => $this->getFkCiclolectivoId(),
+			$keys[2] => $this->getHoraInicio(),
+			$keys[3] => $this->getHoraFin(),
+			$keys[4] => $this->getDescripcion(),
+		);
+		return $result;
+	}
+
+	
+	public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
+	{
+		$pos = TurnoPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+		return $this->setByPosition($pos, $value);
+	}
+
+	
+	public function setByPosition($pos, $value)
+	{
+		switch($pos) {
+			case 0:
+				$this->setId($value);
+				break;
+			case 1:
+				$this->setFkCiclolectivoId($value);
+				break;
+			case 2:
+				$this->setHoraInicio($value);
+				break;
+			case 3:
+				$this->setHoraFin($value);
+				break;
+			case 4:
+				$this->setDescripcion($value);
+				break;
+		} 	}
+
+	
+	public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
+	{
+		$keys = TurnoPeer::getFieldNames($keyType);
+
+		if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
+		if (array_key_exists($keys[1], $arr)) $this->setFkCiclolectivoId($arr[$keys[1]]);
+		if (array_key_exists($keys[2], $arr)) $this->setHoraInicio($arr[$keys[2]]);
+		if (array_key_exists($keys[3], $arr)) $this->setHoraFin($arr[$keys[3]]);
+		if (array_key_exists($keys[4], $arr)) $this->setDescripcion($arr[$keys[4]]);
+	}
+
+	
+	public function buildCriteria()
+	{
+		$criteria = new Criteria(TurnoPeer::DATABASE_NAME);
+
+		if ($this->isColumnModified(TurnoPeer::ID)) $criteria->add(TurnoPeer::ID, $this->id);
+		if ($this->isColumnModified(TurnoPeer::FK_CICLOLECTIVO_ID)) $criteria->add(TurnoPeer::FK_CICLOLECTIVO_ID, $this->fk_ciclolectivo_id);
+		if ($this->isColumnModified(TurnoPeer::HORA_INICIO)) $criteria->add(TurnoPeer::HORA_INICIO, $this->hora_inicio);
+		if ($this->isColumnModified(TurnoPeer::HORA_FIN)) $criteria->add(TurnoPeer::HORA_FIN, $this->hora_fin);
+		if ($this->isColumnModified(TurnoPeer::DESCRIPCION)) $criteria->add(TurnoPeer::DESCRIPCION, $this->descripcion);
+
+		return $criteria;
+	}
+
+	
+	public function buildPkeyCriteria()
+	{
+		$criteria = new Criteria(TurnoPeer::DATABASE_NAME);
+
+		$criteria->add(TurnoPeer::ID, $this->id);
+
+		return $criteria;
+	}
+
+	
+	public function getPrimaryKey()
+	{
+		return $this->getId();
+	}
+
+	
+	public function setPrimaryKey($key)
+	{
+		$this->setId($key);
+	}
+
+	
+	public function copyInto($copyObj, $deepCopy = false)
+	{
+
+		$copyObj->setFkCiclolectivoId($this->fk_ciclolectivo_id);
+
+		$copyObj->setHoraInicio($this->hora_inicio);
+
+		$copyObj->setHoraFin($this->hora_fin);
+
+		$copyObj->setDescripcion($this->descripcion);
+
+
+		if ($deepCopy) {
+									$copyObj->setNew(false);
+
+			foreach($this->getDivisions() as $relObj) {
+				$copyObj->addDivision($relObj->copy($deepCopy));
+			}
+
+			foreach($this->getHorarioescolars() as $relObj) {
+				$copyObj->addHorarioescolar($relObj->copy($deepCopy));
+			}
+
+		} 
+
+		$copyObj->setNew(true);
+
+		$copyObj->setId(NULL); 
+	}
+
+	
+	public function copy($deepCopy = false)
+	{
+				$clazz = get_class($this);
+		$copyObj = new $clazz();
+		$this->copyInto($copyObj, $deepCopy);
+		return $copyObj;
+	}
+
+	
+	public function getPeer()
+	{
+		if (self::$peer === null) {
+			self::$peer = new TurnoPeer();
+		}
+		return self::$peer;
+	}
+
+	
+	public function setCiclolectivo($v)
+	{
+
+
+		if ($v === null) {
+			$this->setFkCiclolectivoId(NULL);
+		} else {
+			$this->setFkCiclolectivoId($v->getId());
+		}
+
+
+		$this->aCiclolectivo = $v;
+	}
+
+
+	
+	public function getCiclolectivo($con = null)
+	{
+				include_once 'lib/model/om/BaseCiclolectivoPeer.php';
+
+		if ($this->aCiclolectivo === null && ($this->fk_ciclolectivo_id !== null)) {
+
+			$this->aCiclolectivo = CiclolectivoPeer::retrieveByPK($this->fk_ciclolectivo_id, $con);
+
+			
+		}
+		return $this->aCiclolectivo;
+	}
+
+	
+	public function initDivisions()
+	{
+		if ($this->collDivisions === null) {
+			$this->collDivisions = array();
+		}
+	}
+
+	
+	public function getDivisions($criteria = null, $con = null)
+	{
+				include_once 'lib/model/om/BaseDivisionPeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		if ($this->collDivisions === null) {
+			if ($this->isNew()) {
+			   $this->collDivisions = array();
+			} else {
+
+				$criteria->add(DivisionPeer::FK_TURNO_ID, $this->getId());
+
+				DivisionPeer::addSelectColumns($criteria);
+				$this->collDivisions = DivisionPeer::doSelect($criteria, $con);
+			}
+		} else {
+						if (!$this->isNew()) {
+												
+
+				$criteria->add(DivisionPeer::FK_TURNO_ID, $this->getId());
+
+				DivisionPeer::addSelectColumns($criteria);
+				if (!isset($this->lastDivisionCriteria) || !$this->lastDivisionCriteria->equals($criteria)) {
+					$this->collDivisions = DivisionPeer::doSelect($criteria, $con);
+				}
+			}
+		}
+		$this->lastDivisionCriteria = $criteria;
+		return $this->collDivisions;
+	}
+
+	
+	public function countDivisions($criteria = null, $distinct = false, $con = null)
+	{
+				include_once 'lib/model/om/BaseDivisionPeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		$criteria->add(DivisionPeer::FK_TURNO_ID, $this->getId());
+
+		return DivisionPeer::doCount($criteria, $distinct, $con);
+	}
+
+	
+	public function addDivision(Division $l)
+	{
+		$this->collDivisions[] = $l;
+		$l->setTurno($this);
+	}
+
+
+	
+	public function getDivisionsJoinAnio($criteria = null, $con = null)
+	{
+				include_once 'lib/model/om/BaseDivisionPeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		if ($this->collDivisions === null) {
+			if ($this->isNew()) {
+				$this->collDivisions = array();
+			} else {
+
+				$criteria->add(DivisionPeer::FK_TURNO_ID, $this->getId());
+
+				$this->collDivisions = DivisionPeer::doSelectJoinAnio($criteria, $con);
+			}
+		} else {
+									
+			$criteria->add(DivisionPeer::FK_TURNO_ID, $this->getId());
+
+			if (!isset($this->lastDivisionCriteria) || !$this->lastDivisionCriteria->equals($criteria)) {
+				$this->collDivisions = DivisionPeer::doSelectJoinAnio($criteria, $con);
+			}
+		}
+		$this->lastDivisionCriteria = $criteria;
+
+		return $this->collDivisions;
+	}
+
+	
+	public function initHorarioescolars()
+	{
+		if ($this->collHorarioescolars === null) {
+			$this->collHorarioescolars = array();
+		}
+	}
+
+	
+	public function getHorarioescolars($criteria = null, $con = null)
+	{
+				include_once 'lib/model/om/BaseHorarioescolarPeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		if ($this->collHorarioescolars === null) {
+			if ($this->isNew()) {
+			   $this->collHorarioescolars = array();
+			} else {
+
+				$criteria->add(HorarioescolarPeer::FK_TURNO_ID, $this->getId());
+
+				HorarioescolarPeer::addSelectColumns($criteria);
+				$this->collHorarioescolars = HorarioescolarPeer::doSelect($criteria, $con);
+			}
+		} else {
+						if (!$this->isNew()) {
+												
+
+				$criteria->add(HorarioescolarPeer::FK_TURNO_ID, $this->getId());
+
+				HorarioescolarPeer::addSelectColumns($criteria);
+				if (!isset($this->lastHorarioescolarCriteria) || !$this->lastHorarioescolarCriteria->equals($criteria)) {
+					$this->collHorarioescolars = HorarioescolarPeer::doSelect($criteria, $con);
+				}
+			}
+		}
+		$this->lastHorarioescolarCriteria = $criteria;
+		return $this->collHorarioescolars;
+	}
+
+	
+	public function countHorarioescolars($criteria = null, $distinct = false, $con = null)
+	{
+				include_once 'lib/model/om/BaseHorarioescolarPeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		$criteria->add(HorarioescolarPeer::FK_TURNO_ID, $this->getId());
+
+		return HorarioescolarPeer::doCount($criteria, $distinct, $con);
+	}
+
+	
+	public function addHorarioescolar(Horarioescolar $l)
+	{
+		$this->collHorarioescolars[] = $l;
+		$l->setTurno($this);
+	}
+
+
+	
+	public function getHorarioescolarsJoinEvento($criteria = null, $con = null)
+	{
+				include_once 'lib/model/om/BaseHorarioescolarPeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		if ($this->collHorarioescolars === null) {
+			if ($this->isNew()) {
+				$this->collHorarioescolars = array();
+			} else {
+
+				$criteria->add(HorarioescolarPeer::FK_TURNO_ID, $this->getId());
+
+				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinEvento($criteria, $con);
+			}
+		} else {
+									
+			$criteria->add(HorarioescolarPeer::FK_TURNO_ID, $this->getId());
+
+			if (!isset($this->lastHorarioescolarCriteria) || !$this->lastHorarioescolarCriteria->equals($criteria)) {
+				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinEvento($criteria, $con);
+			}
+		}
+		$this->lastHorarioescolarCriteria = $criteria;
+
+		return $this->collHorarioescolars;
+	}
+
+
+	
+	public function getHorarioescolarsJoinEstablecimiento($criteria = null, $con = null)
+	{
+				include_once 'lib/model/om/BaseHorarioescolarPeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		if ($this->collHorarioescolars === null) {
+			if ($this->isNew()) {
+				$this->collHorarioescolars = array();
+			} else {
+
+				$criteria->add(HorarioescolarPeer::FK_TURNO_ID, $this->getId());
+
+				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinEstablecimiento($criteria, $con);
+			}
+		} else {
+									
+			$criteria->add(HorarioescolarPeer::FK_TURNO_ID, $this->getId());
+
+			if (!isset($this->lastHorarioescolarCriteria) || !$this->lastHorarioescolarCriteria->equals($criteria)) {
+				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinEstablecimiento($criteria, $con);
+			}
+		}
+		$this->lastHorarioescolarCriteria = $criteria;
+
+		return $this->collHorarioescolars;
+	}
+
+
+	
+	public function getHorarioescolarsJoinHorarioescolartipo($criteria = null, $con = null)
+	{
+				include_once 'lib/model/om/BaseHorarioescolarPeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		if ($this->collHorarioescolars === null) {
+			if ($this->isNew()) {
+				$this->collHorarioescolars = array();
+			} else {
+
+				$criteria->add(HorarioescolarPeer::FK_TURNO_ID, $this->getId());
+
+				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinHorarioescolartipo($criteria, $con);
+			}
+		} else {
+									
+			$criteria->add(HorarioescolarPeer::FK_TURNO_ID, $this->getId());
+
+			if (!isset($this->lastHorarioescolarCriteria) || !$this->lastHorarioescolarCriteria->equals($criteria)) {
+				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinHorarioescolartipo($criteria, $con);
+			}
+		}
+		$this->lastHorarioescolarCriteria = $criteria;
+
+		return $this->collHorarioescolars;
+	}
+
+} 
\ No newline at end of file

Added: prosistem/alba/trunk/alba/lib/model/om/BaseTurnoPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseTurnoPeer.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseTurnoPeer.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -0,0 +1,544 @@
+<?php
+
+
+abstract class BaseTurnoPeer {
+
+	
+	const DATABASE_NAME = 'alba';
+
+	
+	const TABLE_NAME = 'turno';
+
+	
+	const CLASS_DEFAULT = 'lib.model.Turno';
+
+	
+	const NUM_COLUMNS = 5;
+
+	
+	const NUM_LAZY_LOAD_COLUMNS = 0;
+
+
+	
+	const ID = 'turno.ID';
+
+	
+	const FK_CICLOLECTIVO_ID = 'turno.FK_CICLOLECTIVO_ID';
+
+	
+	const HORA_INICIO = 'turno.HORA_INICIO';
+
+	
+	const HORA_FIN = 'turno.HORA_FIN';
+
+	
+	const DESCRIPCION = 'turno.DESCRIPCION';
+
+	
+	private static $phpNameMap = null;
+
+
+	
+	private static $fieldNames = array (
+		BasePeer::TYPE_PHPNAME => array ('Id', 'FkCiclolectivoId', 'HoraInicio', 'HoraFin', 'Descripcion', ),
+		BasePeer::TYPE_COLNAME => array (TurnoPeer::ID, TurnoPeer::FK_CICLOLECTIVO_ID, TurnoPeer::HORA_INICIO, TurnoPeer::HORA_FIN, TurnoPeer::DESCRIPCION, ),
+		BasePeer::TYPE_FIELDNAME => array ('id', 'fk_ciclolectivo_id', 'hora_inicio', 'hora_fin', 'descripcion', ),
+		BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
+	);
+
+	
+	private static $fieldKeys = array (
+		BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'FkCiclolectivoId' => 1, 'HoraInicio' => 2, 'HoraFin' => 3, 'Descripcion' => 4, ),
+		BasePeer::TYPE_COLNAME => array (TurnoPeer::ID => 0, TurnoPeer::FK_CICLOLECTIVO_ID => 1, TurnoPeer::HORA_INICIO => 2, TurnoPeer::HORA_FIN => 3, TurnoPeer::DESCRIPCION => 4, ),
+		BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'fk_ciclolectivo_id' => 1, 'hora_inicio' => 2, 'hora_fin' => 3, 'descripcion' => 4, ),
+		BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
+	);
+
+	
+	public static function getMapBuilder()
+	{
+		include_once 'lib/model/map/TurnoMapBuilder.php';
+		return BasePeer::getMapBuilder('lib.model.map.TurnoMapBuilder');
+	}
+	
+	public static function getPhpNameMap()
+	{
+		if (self::$phpNameMap === null) {
+			$map = TurnoPeer::getTableMap();
+			$columns = $map->getColumns();
+			$nameMap = array();
+			foreach ($columns as $column) {
+				$nameMap[$column->getPhpName()] = $column->getColumnName();
+			}
+			self::$phpNameMap = $nameMap;
+		}
+		return self::$phpNameMap;
+	}
+	
+	static public function translateFieldName($name, $fromType, $toType)
+	{
+		$toNames = self::getFieldNames($toType);
+		$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
+		if ($key === null) {
+			throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
+		}
+		return $toNames[$key];
+	}
+
+	
+
+	static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
+	{
+		if (!array_key_exists($type, self::$fieldNames)) {
+			throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.');
+		}
+		return self::$fieldNames[$type];
+	}
+
+	
+	public static function alias($alias, $column)
+	{
+		return str_replace(TurnoPeer::TABLE_NAME.'.', $alias.'.', $column);
+	}
+
+	
+	public static function addSelectColumns(Criteria $criteria)
+	{
+
+		$criteria->addSelectColumn(TurnoPeer::ID);
+
+		$criteria->addSelectColumn(TurnoPeer::FK_CICLOLECTIVO_ID);
+
+		$criteria->addSelectColumn(TurnoPeer::HORA_INICIO);
+
+		$criteria->addSelectColumn(TurnoPeer::HORA_FIN);
+
+		$criteria->addSelectColumn(TurnoPeer::DESCRIPCION);
+
+	}
+
+	const COUNT = 'COUNT(turno.ID)';
+	const COUNT_DISTINCT = 'COUNT(DISTINCT turno.ID)';
+
+	
+	public static function doCount(Criteria $criteria, $distinct = false, $con = null)
+	{
+				$criteria = clone $criteria;
+
+				$criteria->clearSelectColumns()->clearOrderByColumns();
+		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+			$criteria->addSelectColumn(TurnoPeer::COUNT_DISTINCT);
+		} else {
+			$criteria->addSelectColumn(TurnoPeer::COUNT);
+		}
+
+				foreach($criteria->getGroupByColumns() as $column)
+		{
+			$criteria->addSelectColumn($column);
+		}
+
+		$rs = TurnoPeer::doSelectRS($criteria, $con);
+		if ($rs->next()) {
+			return $rs->getInt(1);
+		} else {
+						return 0;
+		}
+	}
+	
+	public static function doSelectOne(Criteria $criteria, $con = null)
+	{
+		$critcopy = clone $criteria;
+		$critcopy->setLimit(1);
+		$objects = TurnoPeer::doSelect($critcopy, $con);
+		if ($objects) {
+			return $objects[0];
+		}
+		return null;
+	}
+	
+	public static function doSelect(Criteria $criteria, $con = null)
+	{
+		return TurnoPeer::populateObjects(TurnoPeer::doSelectRS($criteria, $con));
+	}
+	
+	public static function doSelectRS(Criteria $criteria, $con = null)
+	{
+		if ($con === null) {
+			$con = Propel::getConnection(self::DATABASE_NAME);
+		}
+
+		if (!$criteria->getSelectColumns()) {
+			$criteria = clone $criteria;
+			TurnoPeer::addSelectColumns($criteria);
+		}
+
+				$criteria->setDbName(self::DATABASE_NAME);
+
+						return BasePeer::doSelect($criteria, $con);
+	}
+	
+	public static function populateObjects(ResultSet $rs)
+	{
+		$results = array();
+	
+				$cls = TurnoPeer::getOMClass();
+		$cls = Propel::import($cls);
+				while($rs->next()) {
+		
+			$obj = new $cls();
+			$obj->hydrate($rs);
+			$results[] = $obj;
+			
+		}
+		return $results;
+	}
+
+	
+	public static function doCountJoinCiclolectivo(Criteria $criteria, $distinct = false, $con = null)
+	{
+				$criteria = clone $criteria;
+
+				$criteria->clearSelectColumns()->clearOrderByColumns();
+		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+			$criteria->addSelectColumn(TurnoPeer::COUNT_DISTINCT);
+		} else {
+			$criteria->addSelectColumn(TurnoPeer::COUNT);
+		}
+
+				foreach($criteria->getGroupByColumns() as $column)
+		{
+			$criteria->addSelectColumn($column);
+		}
+
+		$criteria->addJoin(TurnoPeer::FK_CICLOLECTIVO_ID, CiclolectivoPeer::ID);
+
+		$rs = TurnoPeer::doSelectRS($criteria, $con);
+		if ($rs->next()) {
+			return $rs->getInt(1);
+		} else {
+						return 0;
+		}
+	}
+
+
+	
+	public static function doSelectJoinCiclolectivo(Criteria $c, $con = null)
+	{
+		$c = clone $c;
+
+				if ($c->getDbName() == Propel::getDefaultDB()) {
+			$c->setDbName(self::DATABASE_NAME);
+		}
+
+		TurnoPeer::addSelectColumns($c);
+		$startcol = (TurnoPeer::NUM_COLUMNS - TurnoPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+		CiclolectivoPeer::addSelectColumns($c);
+
+		$c->addJoin(TurnoPeer::FK_CICLOLECTIVO_ID, CiclolectivoPeer::ID);
+		$rs = BasePeer::doSelect($c, $con);
+		$results = array();
+
+		while($rs->next()) {
+
+			$omClass = TurnoPeer::getOMClass();
+
+			$cls = Propel::import($omClass);
+			$obj1 = new $cls();
+			$obj1->hydrate($rs);
+
+			$omClass = CiclolectivoPeer::getOMClass();
+
+			$cls = Propel::import($omClass);
+			$obj2 = new $cls();
+			$obj2->hydrate($rs, $startcol);
+
+			$newObject = true;
+			foreach($results as $temp_obj1) {
+				$temp_obj2 = $temp_obj1->getCiclolectivo(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+					$newObject = false;
+										$temp_obj2->addTurno($obj1); 					break;
+				}
+			}
+			if ($newObject) {
+				$obj2->initTurnos();
+				$obj2->addTurno($obj1); 			}
+			$results[] = $obj1;
+		}
+		return $results;
+	}
+
+
+	
+	public static function doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+	{
+		$criteria = clone $criteria;
+
+				$criteria->clearSelectColumns()->clearOrderByColumns();
+		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+			$criteria->addSelectColumn(TurnoPeer::COUNT_DISTINCT);
+		} else {
+			$criteria->addSelectColumn(TurnoPeer::COUNT);
+		}
+
+				foreach($criteria->getGroupByColumns() as $column)
+		{
+			$criteria->addSelectColumn($column);
+		}
+
+		$criteria->addJoin(TurnoPeer::FK_CICLOLECTIVO_ID, CiclolectivoPeer::ID);
+
+		$rs = TurnoPeer::doSelectRS($criteria, $con);
+		if ($rs->next()) {
+			return $rs->getInt(1);
+		} else {
+						return 0;
+		}
+	}
+
+
+	
+	public static function doSelectJoinAll(Criteria $c, $con = null)
+	{
+		$c = clone $c;
+
+				if ($c->getDbName() == Propel::getDefaultDB()) {
+			$c->setDbName(self::DATABASE_NAME);
+		}
+
+		TurnoPeer::addSelectColumns($c);
+		$startcol2 = (TurnoPeer::NUM_COLUMNS - TurnoPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+		CiclolectivoPeer::addSelectColumns($c);
+		$startcol3 = $startcol2 + CiclolectivoPeer::NUM_COLUMNS;
+
+		$c->addJoin(TurnoPeer::FK_CICLOLECTIVO_ID, CiclolectivoPeer::ID);
+
+		$rs = BasePeer::doSelect($c, $con);
+		$results = array();
+
+		while($rs->next()) {
+
+			$omClass = TurnoPeer::getOMClass();
+
+
+			$cls = Propel::import($omClass);
+			$obj1 = new $cls();
+			$obj1->hydrate($rs);
+
+
+					
+			$omClass = CiclolectivoPeer::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->getCiclolectivo(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+					$newObject = false;
+					$temp_obj2->addTurno($obj1); 					break;
+				}
+			}
+
+			if ($newObject) {
+				$obj2->initTurnos();
+				$obj2->addTurno($obj1);
+			}
+
+			$results[] = $obj1;
+		}
+		return $results;
+	}
+
+	
+	public static function getTableMap()
+	{
+		return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
+	}
+
+	
+	public static function getOMClass()
+	{
+		return TurnoPeer::CLASS_DEFAULT;
+	}
+
+	
+	public static function doInsert($values, $con = null)
+	{
+		if ($con === null) {
+			$con = Propel::getConnection(self::DATABASE_NAME);
+		}
+
+		if ($values instanceof Criteria) {
+			$criteria = clone $values; 		} else {
+			$criteria = $values->buildCriteria(); 		}
+
+		$criteria->remove(TurnoPeer::ID); 
+
+				$criteria->setDbName(self::DATABASE_NAME);
+
+		try {
+									$con->begin();
+			$pk = BasePeer::doInsert($criteria, $con);
+			$con->commit();
+		} catch(PropelException $e) {
+			$con->rollback();
+			throw $e;
+		}
+
+		return $pk;
+	}
+
+	
+	public static function doUpdate($values, $con = null)
+	{
+		if ($con === null) {
+			$con = Propel::getConnection(self::DATABASE_NAME);
+		}
+
+		$selectCriteria = new Criteria(self::DATABASE_NAME);
+
+		if ($values instanceof Criteria) {
+			$criteria = clone $values; 
+			$comparison = $criteria->getComparison(TurnoPeer::ID);
+			$selectCriteria->add(TurnoPeer::ID, $criteria->remove(TurnoPeer::ID), $comparison);
+
+		} else { 			$criteria = $values->buildCriteria(); 			$selectCriteria = $values->buildPkeyCriteria(); 		}
+
+				$criteria->setDbName(self::DATABASE_NAME);
+
+		return BasePeer::doUpdate($selectCriteria, $criteria, $con);
+	}
+
+	
+	public static function doDeleteAll($con = null)
+	{
+		if ($con === null) {
+			$con = Propel::getConnection(self::DATABASE_NAME);
+		}
+		$affectedRows = 0; 		try {
+									$con->begin();
+			$affectedRows += BasePeer::doDeleteAll(TurnoPeer::TABLE_NAME, $con);
+			$con->commit();
+			return $affectedRows;
+		} catch (PropelException $e) {
+			$con->rollback();
+			throw $e;
+		}
+	}
+
+	
+	 public static function doDelete($values, $con = null)
+	 {
+		if ($con === null) {
+			$con = Propel::getConnection(TurnoPeer::DATABASE_NAME);
+		}
+
+		if ($values instanceof Criteria) {
+			$criteria = clone $values; 		} elseif ($values instanceof Turno) {
+
+			$criteria = $values->buildPkeyCriteria();
+		} else {
+						$criteria = new Criteria(self::DATABASE_NAME);
+			$criteria->add(TurnoPeer::ID, (array) $values, Criteria::IN);
+		}
+
+				$criteria->setDbName(self::DATABASE_NAME);
+
+		$affectedRows = 0; 
+		try {
+									$con->begin();
+			
+			$affectedRows += BasePeer::doDelete($criteria, $con);
+			$con->commit();
+			return $affectedRows;
+		} catch (PropelException $e) {
+			$con->rollback();
+			throw $e;
+		}
+	}
+
+	
+	public static function doValidate(Turno $obj, $cols = null)
+	{
+		$columns = array();
+
+		if ($cols) {
+			$dbMap = Propel::getDatabaseMap(TurnoPeer::DATABASE_NAME);
+			$tableMap = $dbMap->getTable(TurnoPeer::TABLE_NAME);
+
+			if (! is_array($cols)) {
+				$cols = array($cols);
+			}
+
+			foreach($cols as $colName) {
+				if ($tableMap->containsColumn($colName)) {
+					$get = 'get' . $tableMap->getColumn($colName)->getPhpName();
+					$columns[$colName] = $obj->$get();
+				}
+			}
+		} else {
+
+		}
+
+		$res =  BasePeer::doValidate(TurnoPeer::DATABASE_NAME, TurnoPeer::TABLE_NAME, $columns);
+    if ($res !== true) {
+        $request = sfContext::getInstance()->getRequest();
+        foreach ($res as $failed) {
+            $col = TurnoPeer::translateFieldname($failed->getColumn(), BasePeer::TYPE_COLNAME, BasePeer::TYPE_PHPNAME);
+            $request->setError($col, $failed->getMessage());
+        }
+    }
+
+    return $res;
+	}
+
+	
+	public static function retrieveByPK($pk, $con = null)
+	{
+		if ($con === null) {
+			$con = Propel::getConnection(self::DATABASE_NAME);
+		}
+
+		$criteria = new Criteria(TurnoPeer::DATABASE_NAME);
+
+		$criteria->add(TurnoPeer::ID, $pk);
+
+
+		$v = TurnoPeer::doSelect($criteria, $con);
+
+		return !empty($v) > 0 ? $v[0] : null;
+	}
+
+	
+	public static function retrieveByPKs($pks, $con = null)
+	{
+		if ($con === null) {
+			$con = Propel::getConnection(self::DATABASE_NAME);
+		}
+
+		$objs = null;
+		if (empty($pks)) {
+			$objs = array();
+		} else {
+			$criteria = new Criteria();
+			$criteria->add(TurnoPeer::ID, $pks, Criteria::IN);
+			$objs = TurnoPeer::doSelect($criteria, $con);
+		}
+		return $objs;
+	}
+
+} 
+if (Propel::isInit()) {
+			try {
+		BaseTurnoPeer::getMapBuilder();
+	} catch (Exception $e) {
+		Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
+	}
+} else {
+			require_once 'lib/model/map/TurnoMapBuilder.php';
+	Propel::registerMapBuilder('lib.model.map.TurnoMapBuilder');
+}

Deleted: prosistem/alba/trunk/alba/lib/model/om/BaseTurnos.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseTurnos.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseTurnos.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -1,860 +0,0 @@
-<?php
-
-
-abstract class BaseTurnos extends BaseObject  implements Persistent {
-
-
-	
-	protected static $peer;
-
-
-	
-	protected $id;
-
-
-	
-	protected $fk_ciclolectivo_id;
-
-
-	
-	protected $hora_inicio;
-
-
-	
-	protected $hora_fin;
-
-
-	
-	protected $descripcion;
-
-	
-	protected $aCiclolectivo;
-
-	
-	protected $collDivisions;
-
-	
-	protected $lastDivisionCriteria = null;
-
-	
-	protected $collHorarioescolars;
-
-	
-	protected $lastHorarioescolarCriteria = null;
-
-	
-	protected $alreadyInSave = false;
-
-	
-	protected $alreadyInValidation = false;
-
-	
-	public function getId()
-	{
-
-		return $this->id;
-	}
-
-	
-	public function getFkCiclolectivoId()
-	{
-
-		return $this->fk_ciclolectivo_id;
-	}
-
-	
-	public function getHoraInicio($format = 'H:i:s')
-	{
-
-		if ($this->hora_inicio === null || $this->hora_inicio === '') {
-			return null;
-		} elseif (!is_int($this->hora_inicio)) {
-						$ts = strtotime($this->hora_inicio);
-			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [hora_inicio] as date/time value: " . var_export($this->hora_inicio, true));
-			}
-		} else {
-			$ts = $this->hora_inicio;
-		}
-		if ($format === null) {
-			return $ts;
-		} elseif (strpos($format, '%') !== false) {
-			return strftime($format, $ts);
-		} else {
-			return date($format, $ts);
-		}
-	}
-
-	
-	public function getHoraFin($format = 'H:i:s')
-	{
-
-		if ($this->hora_fin === null || $this->hora_fin === '') {
-			return null;
-		} elseif (!is_int($this->hora_fin)) {
-						$ts = strtotime($this->hora_fin);
-			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [hora_fin] as date/time value: " . var_export($this->hora_fin, true));
-			}
-		} else {
-			$ts = $this->hora_fin;
-		}
-		if ($format === null) {
-			return $ts;
-		} elseif (strpos($format, '%') !== false) {
-			return strftime($format, $ts);
-		} else {
-			return date($format, $ts);
-		}
-	}
-
-	
-	public function getDescripcion()
-	{
-
-		return $this->descripcion;
-	}
-
-	
-	public function setId($v)
-	{
-
-						if ($v !== null && !is_int($v) && is_numeric($v)) {
-			$v = (int) $v;
-		}
-
-		if ($this->id !== $v) {
-			$this->id = $v;
-			$this->modifiedColumns[] = TurnosPeer::ID;
-		}
-
-	} 
-	
-	public function setFkCiclolectivoId($v)
-	{
-
-						if ($v !== null && !is_int($v) && is_numeric($v)) {
-			$v = (int) $v;
-		}
-
-		if ($this->fk_ciclolectivo_id !== $v) {
-			$this->fk_ciclolectivo_id = $v;
-			$this->modifiedColumns[] = TurnosPeer::FK_CICLOLECTIVO_ID;
-		}
-
-		if ($this->aCiclolectivo !== null && $this->aCiclolectivo->getId() !== $v) {
-			$this->aCiclolectivo = null;
-		}
-
-	} 
-	
-	public function setHoraInicio($v)
-	{
-
-		if ($v !== null && !is_int($v)) {
-			$ts = strtotime($v);
-			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [hora_inicio] from input: " . var_export($v, true));
-			}
-		} else {
-			$ts = $v;
-		}
-		if ($this->hora_inicio !== $ts) {
-			$this->hora_inicio = $ts;
-			$this->modifiedColumns[] = TurnosPeer::HORA_INICIO;
-		}
-
-	} 
-	
-	public function setHoraFin($v)
-	{
-
-		if ($v !== null && !is_int($v)) {
-			$ts = strtotime($v);
-			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [hora_fin] from input: " . var_export($v, true));
-			}
-		} else {
-			$ts = $v;
-		}
-		if ($this->hora_fin !== $ts) {
-			$this->hora_fin = $ts;
-			$this->modifiedColumns[] = TurnosPeer::HORA_FIN;
-		}
-
-	} 
-	
-	public function setDescripcion($v)
-	{
-
-						if ($v !== null && !is_string($v)) {
-			$v = (string) $v; 
-		}
-
-		if ($this->descripcion !== $v) {
-			$this->descripcion = $v;
-			$this->modifiedColumns[] = TurnosPeer::DESCRIPCION;
-		}
-
-	} 
-	
-	public function hydrate(ResultSet $rs, $startcol = 1)
-	{
-		try {
-
-			$this->id = $rs->getInt($startcol + 0);
-
-			$this->fk_ciclolectivo_id = $rs->getInt($startcol + 1);
-
-			$this->hora_inicio = $rs->getTime($startcol + 2, null);
-
-			$this->hora_fin = $rs->getTime($startcol + 3, null);
-
-			$this->descripcion = $rs->getString($startcol + 4);
-
-			$this->resetModified();
-
-			$this->setNew(false);
-
-						return $startcol + 5; 
-		} catch (Exception $e) {
-			throw new PropelException("Error populating Turnos object", $e);
-		}
-	}
-
-	
-	public function delete($con = null)
-	{
-		if ($this->isDeleted()) {
-			throw new PropelException("This object has already been deleted.");
-		}
-
-		if ($con === null) {
-			$con = Propel::getConnection(TurnosPeer::DATABASE_NAME);
-		}
-
-		try {
-			$con->begin();
-			TurnosPeer::doDelete($this, $con);
-			$this->setDeleted(true);
-			$con->commit();
-		} catch (PropelException $e) {
-			$con->rollback();
-			throw $e;
-		}
-	}
-
-	
-	public function save($con = null)
-	{
-		if ($this->isDeleted()) {
-			throw new PropelException("You cannot save an object that has been deleted.");
-		}
-
-		if ($con === null) {
-			$con = Propel::getConnection(TurnosPeer::DATABASE_NAME);
-		}
-
-		try {
-			$con->begin();
-			$affectedRows = $this->doSave($con);
-			$con->commit();
-			return $affectedRows;
-		} catch (PropelException $e) {
-			$con->rollback();
-			throw $e;
-		}
-	}
-
-	
-	protected function doSave($con)
-	{
-		$affectedRows = 0; 		if (!$this->alreadyInSave) {
-			$this->alreadyInSave = true;
-
-
-												
-			if ($this->aCiclolectivo !== null) {
-				if ($this->aCiclolectivo->isModified()) {
-					$affectedRows += $this->aCiclolectivo->save($con);
-				}
-				$this->setCiclolectivo($this->aCiclolectivo);
-			}
-
-
-						if ($this->isModified()) {
-				if ($this->isNew()) {
-					$pk = TurnosPeer::doInsert($this, $con);
-					$affectedRows += 1; 										 										 
-					$this->setId($pk);  
-					$this->setNew(false);
-				} else {
-					$affectedRows += TurnosPeer::doUpdate($this, $con);
-				}
-				$this->resetModified(); 			}
-
-			if ($this->collDivisions !== null) {
-				foreach($this->collDivisions as $referrerFK) {
-					if (!$referrerFK->isDeleted()) {
-						$affectedRows += $referrerFK->save($con);
-					}
-				}
-			}
-
-			if ($this->collHorarioescolars !== null) {
-				foreach($this->collHorarioescolars as $referrerFK) {
-					if (!$referrerFK->isDeleted()) {
-						$affectedRows += $referrerFK->save($con);
-					}
-				}
-			}
-
-			$this->alreadyInSave = false;
-		}
-		return $affectedRows;
-	} 
-	
-	protected $validationFailures = array();
-
-	
-	public function getValidationFailures()
-	{
-		return $this->validationFailures;
-	}
-
-	
-	public function validate($columns = null)
-	{
-		$res = $this->doValidate($columns);
-		if ($res === true) {
-			$this->validationFailures = array();
-			return true;
-		} else {
-			$this->validationFailures = $res;
-			return false;
-		}
-	}
-
-	
-	protected function doValidate($columns = null)
-	{
-		if (!$this->alreadyInValidation) {
-			$this->alreadyInValidation = true;
-			$retval = null;
-
-			$failureMap = array();
-
-
-												
-			if ($this->aCiclolectivo !== null) {
-				if (!$this->aCiclolectivo->validate($columns)) {
-					$failureMap = array_merge($failureMap, $this->aCiclolectivo->getValidationFailures());
-				}
-			}
-
-
-			if (($retval = TurnosPeer::doValidate($this, $columns)) !== true) {
-				$failureMap = array_merge($failureMap, $retval);
-			}
-
-
-				if ($this->collDivisions !== null) {
-					foreach($this->collDivisions as $referrerFK) {
-						if (!$referrerFK->validate($columns)) {
-							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
-						}
-					}
-				}
-
-				if ($this->collHorarioescolars !== null) {
-					foreach($this->collHorarioescolars as $referrerFK) {
-						if (!$referrerFK->validate($columns)) {
-							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
-						}
-					}
-				}
-
-
-			$this->alreadyInValidation = false;
-		}
-
-		return (!empty($failureMap) ? $failureMap : true);
-	}
-
-	
-	public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
-	{
-		$pos = TurnosPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
-		return $this->getByPosition($pos);
-	}
-
-	
-	public function getByPosition($pos)
-	{
-		switch($pos) {
-			case 0:
-				return $this->getId();
-				break;
-			case 1:
-				return $this->getFkCiclolectivoId();
-				break;
-			case 2:
-				return $this->getHoraInicio();
-				break;
-			case 3:
-				return $this->getHoraFin();
-				break;
-			case 4:
-				return $this->getDescripcion();
-				break;
-			default:
-				return null;
-				break;
-		} 	}
-
-	
-	public function toArray($keyType = BasePeer::TYPE_PHPNAME)
-	{
-		$keys = TurnosPeer::getFieldNames($keyType);
-		$result = array(
-			$keys[0] => $this->getId(),
-			$keys[1] => $this->getFkCiclolectivoId(),
-			$keys[2] => $this->getHoraInicio(),
-			$keys[3] => $this->getHoraFin(),
-			$keys[4] => $this->getDescripcion(),
-		);
-		return $result;
-	}
-
-	
-	public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
-	{
-		$pos = TurnosPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
-		return $this->setByPosition($pos, $value);
-	}
-
-	
-	public function setByPosition($pos, $value)
-	{
-		switch($pos) {
-			case 0:
-				$this->setId($value);
-				break;
-			case 1:
-				$this->setFkCiclolectivoId($value);
-				break;
-			case 2:
-				$this->setHoraInicio($value);
-				break;
-			case 3:
-				$this->setHoraFin($value);
-				break;
-			case 4:
-				$this->setDescripcion($value);
-				break;
-		} 	}
-
-	
-	public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
-	{
-		$keys = TurnosPeer::getFieldNames($keyType);
-
-		if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
-		if (array_key_exists($keys[1], $arr)) $this->setFkCiclolectivoId($arr[$keys[1]]);
-		if (array_key_exists($keys[2], $arr)) $this->setHoraInicio($arr[$keys[2]]);
-		if (array_key_exists($keys[3], $arr)) $this->setHoraFin($arr[$keys[3]]);
-		if (array_key_exists($keys[4], $arr)) $this->setDescripcion($arr[$keys[4]]);
-	}
-
-	
-	public function buildCriteria()
-	{
-		$criteria = new Criteria(TurnosPeer::DATABASE_NAME);
-
-		if ($this->isColumnModified(TurnosPeer::ID)) $criteria->add(TurnosPeer::ID, $this->id);
-		if ($this->isColumnModified(TurnosPeer::FK_CICLOLECTIVO_ID)) $criteria->add(TurnosPeer::FK_CICLOLECTIVO_ID, $this->fk_ciclolectivo_id);
-		if ($this->isColumnModified(TurnosPeer::HORA_INICIO)) $criteria->add(TurnosPeer::HORA_INICIO, $this->hora_inicio);
-		if ($this->isColumnModified(TurnosPeer::HORA_FIN)) $criteria->add(TurnosPeer::HORA_FIN, $this->hora_fin);
-		if ($this->isColumnModified(TurnosPeer::DESCRIPCION)) $criteria->add(TurnosPeer::DESCRIPCION, $this->descripcion);
-
-		return $criteria;
-	}
-
-	
-	public function buildPkeyCriteria()
-	{
-		$criteria = new Criteria(TurnosPeer::DATABASE_NAME);
-
-		$criteria->add(TurnosPeer::ID, $this->id);
-
-		return $criteria;
-	}
-
-	
-	public function getPrimaryKey()
-	{
-		return $this->getId();
-	}
-
-	
-	public function setPrimaryKey($key)
-	{
-		$this->setId($key);
-	}
-
-	
-	public function copyInto($copyObj, $deepCopy = false)
-	{
-
-		$copyObj->setFkCiclolectivoId($this->fk_ciclolectivo_id);
-
-		$copyObj->setHoraInicio($this->hora_inicio);
-
-		$copyObj->setHoraFin($this->hora_fin);
-
-		$copyObj->setDescripcion($this->descripcion);
-
-
-		if ($deepCopy) {
-									$copyObj->setNew(false);
-
-			foreach($this->getDivisions() as $relObj) {
-				$copyObj->addDivision($relObj->copy($deepCopy));
-			}
-
-			foreach($this->getHorarioescolars() as $relObj) {
-				$copyObj->addHorarioescolar($relObj->copy($deepCopy));
-			}
-
-		} 
-
-		$copyObj->setNew(true);
-
-		$copyObj->setId(NULL); 
-	}
-
-	
-	public function copy($deepCopy = false)
-	{
-				$clazz = get_class($this);
-		$copyObj = new $clazz();
-		$this->copyInto($copyObj, $deepCopy);
-		return $copyObj;
-	}
-
-	
-	public function getPeer()
-	{
-		if (self::$peer === null) {
-			self::$peer = new TurnosPeer();
-		}
-		return self::$peer;
-	}
-
-	
-	public function setCiclolectivo($v)
-	{
-
-
-		if ($v === null) {
-			$this->setFkCiclolectivoId(NULL);
-		} else {
-			$this->setFkCiclolectivoId($v->getId());
-		}
-
-
-		$this->aCiclolectivo = $v;
-	}
-
-
-	
-	public function getCiclolectivo($con = null)
-	{
-				include_once 'lib/model/om/BaseCiclolectivoPeer.php';
-
-		if ($this->aCiclolectivo === null && ($this->fk_ciclolectivo_id !== null)) {
-
-			$this->aCiclolectivo = CiclolectivoPeer::retrieveByPK($this->fk_ciclolectivo_id, $con);
-
-			
-		}
-		return $this->aCiclolectivo;
-	}
-
-	
-	public function initDivisions()
-	{
-		if ($this->collDivisions === null) {
-			$this->collDivisions = array();
-		}
-	}
-
-	
-	public function getDivisions($criteria = null, $con = null)
-	{
-				include_once 'lib/model/om/BaseDivisionPeer.php';
-		if ($criteria === null) {
-			$criteria = new Criteria();
-		}
-		elseif ($criteria instanceof Criteria)
-		{
-			$criteria = clone $criteria;
-		}
-
-		if ($this->collDivisions === null) {
-			if ($this->isNew()) {
-			   $this->collDivisions = array();
-			} else {
-
-				$criteria->add(DivisionPeer::FK_TURNOS_ID, $this->getId());
-
-				DivisionPeer::addSelectColumns($criteria);
-				$this->collDivisions = DivisionPeer::doSelect($criteria, $con);
-			}
-		} else {
-						if (!$this->isNew()) {
-												
-
-				$criteria->add(DivisionPeer::FK_TURNOS_ID, $this->getId());
-
-				DivisionPeer::addSelectColumns($criteria);
-				if (!isset($this->lastDivisionCriteria) || !$this->lastDivisionCriteria->equals($criteria)) {
-					$this->collDivisions = DivisionPeer::doSelect($criteria, $con);
-				}
-			}
-		}
-		$this->lastDivisionCriteria = $criteria;
-		return $this->collDivisions;
-	}
-
-	
-	public function countDivisions($criteria = null, $distinct = false, $con = null)
-	{
-				include_once 'lib/model/om/BaseDivisionPeer.php';
-		if ($criteria === null) {
-			$criteria = new Criteria();
-		}
-		elseif ($criteria instanceof Criteria)
-		{
-			$criteria = clone $criteria;
-		}
-
-		$criteria->add(DivisionPeer::FK_TURNOS_ID, $this->getId());
-
-		return DivisionPeer::doCount($criteria, $distinct, $con);
-	}
-
-	
-	public function addDivision(Division $l)
-	{
-		$this->collDivisions[] = $l;
-		$l->setTurnos($this);
-	}
-
-
-	
-	public function getDivisionsJoinAnio($criteria = null, $con = null)
-	{
-				include_once 'lib/model/om/BaseDivisionPeer.php';
-		if ($criteria === null) {
-			$criteria = new Criteria();
-		}
-		elseif ($criteria instanceof Criteria)
-		{
-			$criteria = clone $criteria;
-		}
-
-		if ($this->collDivisions === null) {
-			if ($this->isNew()) {
-				$this->collDivisions = array();
-			} else {
-
-				$criteria->add(DivisionPeer::FK_TURNOS_ID, $this->getId());
-
-				$this->collDivisions = DivisionPeer::doSelectJoinAnio($criteria, $con);
-			}
-		} else {
-									
-			$criteria->add(DivisionPeer::FK_TURNOS_ID, $this->getId());
-
-			if (!isset($this->lastDivisionCriteria) || !$this->lastDivisionCriteria->equals($criteria)) {
-				$this->collDivisions = DivisionPeer::doSelectJoinAnio($criteria, $con);
-			}
-		}
-		$this->lastDivisionCriteria = $criteria;
-
-		return $this->collDivisions;
-	}
-
-	
-	public function initHorarioescolars()
-	{
-		if ($this->collHorarioescolars === null) {
-			$this->collHorarioescolars = array();
-		}
-	}
-
-	
-	public function getHorarioescolars($criteria = null, $con = null)
-	{
-				include_once 'lib/model/om/BaseHorarioescolarPeer.php';
-		if ($criteria === null) {
-			$criteria = new Criteria();
-		}
-		elseif ($criteria instanceof Criteria)
-		{
-			$criteria = clone $criteria;
-		}
-
-		if ($this->collHorarioescolars === null) {
-			if ($this->isNew()) {
-			   $this->collHorarioescolars = array();
-			} else {
-
-				$criteria->add(HorarioescolarPeer::FK_TURNOS_ID, $this->getId());
-
-				HorarioescolarPeer::addSelectColumns($criteria);
-				$this->collHorarioescolars = HorarioescolarPeer::doSelect($criteria, $con);
-			}
-		} else {
-						if (!$this->isNew()) {
-												
-
-				$criteria->add(HorarioescolarPeer::FK_TURNOS_ID, $this->getId());
-
-				HorarioescolarPeer::addSelectColumns($criteria);
-				if (!isset($this->lastHorarioescolarCriteria) || !$this->lastHorarioescolarCriteria->equals($criteria)) {
-					$this->collHorarioescolars = HorarioescolarPeer::doSelect($criteria, $con);
-				}
-			}
-		}
-		$this->lastHorarioescolarCriteria = $criteria;
-		return $this->collHorarioescolars;
-	}
-
-	
-	public function countHorarioescolars($criteria = null, $distinct = false, $con = null)
-	{
-				include_once 'lib/model/om/BaseHorarioescolarPeer.php';
-		if ($criteria === null) {
-			$criteria = new Criteria();
-		}
-		elseif ($criteria instanceof Criteria)
-		{
-			$criteria = clone $criteria;
-		}
-
-		$criteria->add(HorarioescolarPeer::FK_TURNOS_ID, $this->getId());
-
-		return HorarioescolarPeer::doCount($criteria, $distinct, $con);
-	}
-
-	
-	public function addHorarioescolar(Horarioescolar $l)
-	{
-		$this->collHorarioescolars[] = $l;
-		$l->setTurnos($this);
-	}
-
-
-	
-	public function getHorarioescolarsJoinEvento($criteria = null, $con = null)
-	{
-				include_once 'lib/model/om/BaseHorarioescolarPeer.php';
-		if ($criteria === null) {
-			$criteria = new Criteria();
-		}
-		elseif ($criteria instanceof Criteria)
-		{
-			$criteria = clone $criteria;
-		}
-
-		if ($this->collHorarioescolars === null) {
-			if ($this->isNew()) {
-				$this->collHorarioescolars = array();
-			} else {
-
-				$criteria->add(HorarioescolarPeer::FK_TURNOS_ID, $this->getId());
-
-				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinEvento($criteria, $con);
-			}
-		} else {
-									
-			$criteria->add(HorarioescolarPeer::FK_TURNOS_ID, $this->getId());
-
-			if (!isset($this->lastHorarioescolarCriteria) || !$this->lastHorarioescolarCriteria->equals($criteria)) {
-				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinEvento($criteria, $con);
-			}
-		}
-		$this->lastHorarioescolarCriteria = $criteria;
-
-		return $this->collHorarioescolars;
-	}
-
-
-	
-	public function getHorarioescolarsJoinEstablecimiento($criteria = null, $con = null)
-	{
-				include_once 'lib/model/om/BaseHorarioescolarPeer.php';
-		if ($criteria === null) {
-			$criteria = new Criteria();
-		}
-		elseif ($criteria instanceof Criteria)
-		{
-			$criteria = clone $criteria;
-		}
-
-		if ($this->collHorarioescolars === null) {
-			if ($this->isNew()) {
-				$this->collHorarioescolars = array();
-			} else {
-
-				$criteria->add(HorarioescolarPeer::FK_TURNOS_ID, $this->getId());
-
-				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinEstablecimiento($criteria, $con);
-			}
-		} else {
-									
-			$criteria->add(HorarioescolarPeer::FK_TURNOS_ID, $this->getId());
-
-			if (!isset($this->lastHorarioescolarCriteria) || !$this->lastHorarioescolarCriteria->equals($criteria)) {
-				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinEstablecimiento($criteria, $con);
-			}
-		}
-		$this->lastHorarioescolarCriteria = $criteria;
-
-		return $this->collHorarioescolars;
-	}
-
-
-	
-	public function getHorarioescolarsJoinHorarioescolartipo($criteria = null, $con = null)
-	{
-				include_once 'lib/model/om/BaseHorarioescolarPeer.php';
-		if ($criteria === null) {
-			$criteria = new Criteria();
-		}
-		elseif ($criteria instanceof Criteria)
-		{
-			$criteria = clone $criteria;
-		}
-
-		if ($this->collHorarioescolars === null) {
-			if ($this->isNew()) {
-				$this->collHorarioescolars = array();
-			} else {
-
-				$criteria->add(HorarioescolarPeer::FK_TURNOS_ID, $this->getId());
-
-				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinHorarioescolartipo($criteria, $con);
-			}
-		} else {
-									
-			$criteria->add(HorarioescolarPeer::FK_TURNOS_ID, $this->getId());
-
-			if (!isset($this->lastHorarioescolarCriteria) || !$this->lastHorarioescolarCriteria->equals($criteria)) {
-				$this->collHorarioescolars = HorarioescolarPeer::doSelectJoinHorarioescolartipo($criteria, $con);
-			}
-		}
-		$this->lastHorarioescolarCriteria = $criteria;
-
-		return $this->collHorarioescolars;
-	}
-
-} 
\ No newline at end of file

Deleted: prosistem/alba/trunk/alba/lib/model/om/BaseTurnosPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseTurnosPeer.php	2007-08-01 19:26:00 UTC (rev 4894)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseTurnosPeer.php	2007-08-01 19:29:19 UTC (rev 4895)
@@ -1,544 +0,0 @@
-<?php
-
-
-abstract class BaseTurnosPeer {
-
-	
-	const DATABASE_NAME = 'alba';
-
-	
-	const TABLE_NAME = 'turnos';
-
-	
-	const CLASS_DEFAULT = 'lib.model.Turnos';
-
-	
-	const NUM_COLUMNS = 5;
-
-	
-	const NUM_LAZY_LOAD_COLUMNS = 0;
-
-
-	
-	const ID = 'turnos.ID';
-
-	
-	const FK_CICLOLECTIVO_ID = 'turnos.FK_CICLOLECTIVO_ID';
-
-	
-	const HORA_INICIO = 'turnos.HORA_INICIO';
-
-	
-	const HORA_FIN = 'turnos.HORA_FIN';
-
-	
-	const DESCRIPCION = 'turnos.DESCRIPCION';
-
-	
-	private static $phpNameMap = null;
-
-
-	
-	private static $fieldNames = array (
-		BasePeer::TYPE_PHPNAME => array ('Id', 'FkCiclolectivoId', 'HoraInicio', 'HoraFin', 'Descripcion', ),
-		BasePeer::TYPE_COLNAME => array (TurnosPeer::ID, TurnosPeer::FK_CICLOLECTIVO_ID, TurnosPeer::HORA_INICIO, TurnosPeer::HORA_FIN, TurnosPeer::DESCRIPCION, ),
-		BasePeer::TYPE_FIELDNAME => array ('id', 'fk_ciclolectivo_id', 'hora_inicio', 'hora_fin', 'descripcion', ),
-		BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
-	);
-
-	
-	private static $fieldKeys = array (
-		BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'FkCiclolectivoId' => 1, 'HoraInicio' => 2, 'HoraFin' => 3, 'Descripcion' => 4, ),
-		BasePeer::TYPE_COLNAME => array (TurnosPeer::ID => 0, TurnosPeer::FK_CICLOLECTIVO_ID => 1, TurnosPeer::HORA_INICIO => 2, TurnosPeer::HORA_FIN => 3, TurnosPeer::DESCRIPCION => 4, ),
-		BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'fk_ciclolectivo_id' => 1, 'hora_inicio' => 2, 'hora_fin' => 3, 'descripcion' => 4, ),
-		BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
-	);
-
-	
-	public static function getMapBuilder()
-	{
-		include_once 'lib/model/map/TurnosMapBuilder.php';
-		return BasePeer::getMapBuilder('lib.model.map.TurnosMapBuilder');
-	}
-	
-	public static function getPhpNameMap()
-	{
-		if (self::$phpNameMap === null) {
-			$map = TurnosPeer::getTableMap();
-			$columns = $map->getColumns();
-			$nameMap = array();
-			foreach ($columns as $column) {
-				$nameMap[$column->getPhpName()] = $column->getColumnName();
-			}
-			self::$phpNameMap = $nameMap;
-		}
-		return self::$phpNameMap;
-	}
-	
-	static public function translateFieldName($name, $fromType, $toType)
-	{
-		$toNames = self::getFieldNames($toType);
-		$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
-		if ($key === null) {
-			throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
-		}
-		return $toNames[$key];
-	}
-
-	
-
-	static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
-	{
-		if (!array_key_exists($type, self::$fieldNames)) {
-			throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.');
-		}
-		return self::$fieldNames[$type];
-	}
-
-	
-	public static function alias($alias, $column)
-	{
-		return str_replace(TurnosPeer::TABLE_NAME.'.', $alias.'.', $column);
-	}
-
-	
-	public static function addSelectColumns(Criteria $criteria)
-	{
-
-		$criteria->addSelectColumn(TurnosPeer::ID);
-
-		$criteria->addSelectColumn(TurnosPeer::FK_CICLOLECTIVO_ID);
-
-		$criteria->addSelectColumn(TurnosPeer::HORA_INICIO);
-
-		$criteria->addSelectColumn(TurnosPeer::HORA_FIN);
-
-		$criteria->addSelectColumn(TurnosPeer::DESCRIPCION);
-
-	}
-
-	const COUNT = 'COUNT(turnos.ID)';
-	const COUNT_DISTINCT = 'COUNT(DISTINCT turnos.ID)';
-
-	
-	public static function doCount(Criteria $criteria, $distinct = false, $con = null)
-	{
-				$criteria = clone $criteria;
-
-				$criteria->clearSelectColumns()->clearOrderByColumns();
-		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
-			$criteria->addSelectColumn(TurnosPeer::COUNT_DISTINCT);
-		} else {
-			$criteria->addSelectColumn(TurnosPeer::COUNT);
-		}
-
-				foreach($criteria->getGroupByColumns() as $column)
-		{
-			$criteria->addSelectColumn($column);
-		}
-
-		$rs = TurnosPeer::doSelectRS($criteria, $con);
-		if ($rs->next()) {
-			return $rs->getInt(1);
-		} else {
-						return 0;
-		}
-	}
-	
-	public static function doSelectOne(Criteria $criteria, $con = null)
-	{
-		$critcopy = clone $criteria;
-		$critcopy->setLimit(1);
-		$objects = TurnosPeer::doSelect($critcopy, $con);
-		if ($objects) {
-			return $objects[0];
-		}
-		return null;
-	}
-	
-	public static function doSelect(Criteria $criteria, $con = null)
-	{
-		return TurnosPeer::populateObjects(TurnosPeer::doSelectRS($criteria, $con));
-	}
-	
-	public static function doSelectRS(Criteria $criteria, $con = null)
-	{
-		if ($con === null) {
-			$con = Propel::getConnection(self::DATABASE_NAME);
-		}
-
-		if (!$criteria->getSelectColumns()) {
-			$criteria = clone $criteria;
-			TurnosPeer::addSelectColumns($criteria);
-		}
-
-				$criteria->setDbName(self::DATABASE_NAME);
-
-						return BasePeer::doSelect($criteria, $con);
-	}
-	
-	public static function populateObjects(ResultSet $rs)
-	{
-		$results = array();
-	
-				$cls = TurnosPeer::getOMClass();
-		$cls = Propel::import($cls);
-				while($rs->next()) {
-		
-			$obj = new $cls();
-			$obj->hydrate($rs);
-			$results[] = $obj;
-			
-		}
-		return $results;
-	}
-
-	
-	public static function doCountJoinCiclolectivo(Criteria $criteria, $distinct = false, $con = null)
-	{
-				$criteria = clone $criteria;
-
-				$criteria->clearSelectColumns()->clearOrderByColumns();
-		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
-			$criteria->addSelectColumn(TurnosPeer::COUNT_DISTINCT);
-		} else {
-			$criteria->addSelectColumn(TurnosPeer::COUNT);
-		}
-
-				foreach($criteria->getGroupByColumns() as $column)
-		{
-			$criteria->addSelectColumn($column);
-		}
-
-		$criteria->addJoin(TurnosPeer::FK_CICLOLECTIVO_ID, CiclolectivoPeer::ID);
-
-		$rs = TurnosPeer::doSelectRS($criteria, $con);
-		if ($rs->next()) {
-			return $rs->getInt(1);
-		} else {
-						return 0;
-		}
-	}
-
-
-	
-	public static function doSelectJoinCiclolectivo(Criteria $c, $con = null)
-	{
-		$c = clone $c;
-
-				if ($c->getDbName() == Propel::getDefaultDB()) {
-			$c->setDbName(self::DATABASE_NAME);
-		}
-
-		TurnosPeer::addSelectColumns($c);
-		$startcol = (TurnosPeer::NUM_COLUMNS - TurnosPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
-		CiclolectivoPeer::addSelectColumns($c);
-
-		$c->addJoin(TurnosPeer::FK_CICLOLECTIVO_ID, CiclolectivoPeer::ID);
-		$rs = BasePeer::doSelect($c, $con);
-		$results = array();
-
-		while($rs->next()) {
-
-			$omClass = TurnosPeer::getOMClass();
-
-			$cls = Propel::import($omClass);
-			$obj1 = new $cls();
-			$obj1->hydrate($rs);
-
-			$omClass = CiclolectivoPeer::getOMClass();
-
-			$cls = Propel::import($omClass);
-			$obj2 = new $cls();
-			$obj2->hydrate($rs, $startcol);
-
-			$newObject = true;
-			foreach($results as $temp_obj1) {
-				$temp_obj2 = $temp_obj1->getCiclolectivo(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
-					$newObject = false;
-										$temp_obj2->addTurnos($obj1); 					break;
-				}
-			}
-			if ($newObject) {
-				$obj2->initTurnoss();
-				$obj2->addTurnos($obj1); 			}
-			$results[] = $obj1;
-		}
-		return $results;
-	}
-
-
-	
-	public static function doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
-	{
-		$criteria = clone $criteria;
-
-				$criteria->clearSelectColumns()->clearOrderByColumns();
-		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
-			$criteria->addSelectColumn(TurnosPeer::COUNT_DISTINCT);
-		} else {
-			$criteria->addSelectColumn(TurnosPeer::COUNT);
-		}
-
-				foreach($criteria->getGroupByColumns() as $column)
-		{
-			$criteria->addSelectColumn($column);
-		}
-
-		$criteria->addJoin(TurnosPeer::FK_CICLOLECTIVO_ID, CiclolectivoPeer::ID);
-
-		$rs = TurnosPeer::doSelectRS($criteria, $con);
-		if ($rs->next()) {
-			return $rs->getInt(1);
-		} else {
-						return 0;
-		}
-	}
-
-
-	
-	public static function doSelectJoinAll(Criteria $c, $con = null)
-	{
-		$c = clone $c;
-
-				if ($c->getDbName() == Propel::getDefaultDB()) {
-			$c->setDbName(self::DATABASE_NAME);
-		}
-
-		TurnosPeer::addSelectColumns($c);
-		$startcol2 = (TurnosPeer::NUM_COLUMNS - TurnosPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
-
-		CiclolectivoPeer::addSelectColumns($c);
-		$startcol3 = $startcol2 + CiclolectivoPeer::NUM_COLUMNS;
-
-		$c->addJoin(TurnosPeer::FK_CICLOLECTIVO_ID, CiclolectivoPeer::ID);
-
-		$rs = BasePeer::doSelect($c, $con);
-		$results = array();
-
-		while($rs->next()) {
-
-			$omClass = TurnosPeer::getOMClass();
-
-
-			$cls = Propel::import($omClass);
-			$obj1 = new $cls();
-			$obj1->hydrate($rs);
-
-
-					
-			$omClass = CiclolectivoPeer::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->getCiclolectivo(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
-					$newObject = false;
-					$temp_obj2->addTurnos($obj1); 					break;
-				}
-			}
-
-			if ($newObject) {
-				$obj2->initTurnoss();
-				$obj2->addTurnos($obj1);
-			}
-
-			$results[] = $obj1;
-		}
-		return $results;
-	}
-
-	
-	public static function getTableMap()
-	{
-		return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
-	}
-
-	
-	public static function getOMClass()
-	{
-		return TurnosPeer::CLASS_DEFAULT;
-	}
-
-	
-	public static function doInsert($values, $con = null)
-	{
-		if ($con === null) {
-			$con = Propel::getConnection(self::DATABASE_NAME);
-		}
-
-		if ($values instanceof Criteria) {
-			$criteria = clone $values; 		} else {
-			$criteria = $values->buildCriteria(); 		}
-
-		$criteria->remove(TurnosPeer::ID); 
-
-				$criteria->setDbName(self::DATABASE_NAME);
-
-		try {
-									$con->begin();
-			$pk = BasePeer::doInsert($criteria, $con);
-			$con->commit();
-		} catch(PropelException $e) {
-			$con->rollback();
-			throw $e;
-		}
-
-		return $pk;
-	}
-
-	
-	public static function doUpdate($values, $con = null)
-	{
-		if ($con === null) {
-			$con = Propel::getConnection(self::DATABASE_NAME);
-		}
-
-		$selectCriteria = new Criteria(self::DATABASE_NAME);
-
-		if ($values instanceof Criteria) {
-			$criteria = clone $values; 
-			$comparison = $criteria->getComparison(TurnosPeer::ID);
-			$selectCriteria->add(TurnosPeer::ID, $criteria->remove(TurnosPeer::ID), $comparison);
-
-		} else { 			$criteria = $values->buildCriteria(); 			$selectCriteria = $values->buildPkeyCriteria(); 		}
-
-				$criteria->setDbName(self::DATABASE_NAME);
-
-		return BasePeer::doUpdate($selectCriteria, $criteria, $con);
-	}
-
-	
-	public static function doDeleteAll($con = null)
-	{
-		if ($con === null) {
-			$con = Propel::getConnection(self::DATABASE_NAME);
-		}
-		$affectedRows = 0; 		try {
-									$con->begin();
-			$affectedRows += BasePeer::doDeleteAll(TurnosPeer::TABLE_NAME, $con);
-			$con->commit();
-			return $affectedRows;
-		} catch (PropelException $e) {
-			$con->rollback();
-			throw $e;
-		}
-	}
-
-	
-	 public static function doDelete($values, $con = null)
-	 {
-		if ($con === null) {
-			$con = Propel::getConnection(TurnosPeer::DATABASE_NAME);
-		}
-
-		if ($values instanceof Criteria) {
-			$criteria = clone $values; 		} elseif ($values instanceof Turnos) {
-
-			$criteria = $values->buildPkeyCriteria();
-		} else {
-						$criteria = new Criteria(self::DATABASE_NAME);
-			$criteria->add(TurnosPeer::ID, (array) $values, Criteria::IN);
-		}
-
-				$criteria->setDbName(self::DATABASE_NAME);
-
-		$affectedRows = 0; 
-		try {
-									$con->begin();
-			
-			$affectedRows += BasePeer::doDelete($criteria, $con);
-			$con->commit();
-			return $affectedRows;
-		} catch (PropelException $e) {
-			$con->rollback();
-			throw $e;
-		}
-	}
-
-	
-	public static function doValidate(Turnos $obj, $cols = null)
-	{
-		$columns = array();
-
-		if ($cols) {
-			$dbMap = Propel::getDatabaseMap(TurnosPeer::DATABASE_NAME);
-			$tableMap = $dbMap->getTable(TurnosPeer::TABLE_NAME);
-
-			if (! is_array($cols)) {
-				$cols = array($cols);
-			}
-
-			foreach($cols as $colName) {
-				if ($tableMap->containsColumn($colName)) {
-					$get = 'get' . $tableMap->getColumn($colName)->getPhpName();
-					$columns[$colName] = $obj->$get();
-				}
-			}
-		} else {
-
-		}
-
-		$res =  BasePeer::doValidate(TurnosPeer::DATABASE_NAME, TurnosPeer::TABLE_NAME, $columns);
-    if ($res !== true) {
-        $request = sfContext::getInstance()->getRequest();
-        foreach ($res as $failed) {
-            $col = TurnosPeer::translateFieldname($failed->getColumn(), BasePeer::TYPE_COLNAME, BasePeer::TYPE_PHPNAME);
-            $request->setError($col, $failed->getMessage());
-        }
-    }
-
-    return $res;
-	}
-
-	
-	public static function retrieveByPK($pk, $con = null)
-	{
-		if ($con === null) {
-			$con = Propel::getConnection(self::DATABASE_NAME);
-		}
-
-		$criteria = new Criteria(TurnosPeer::DATABASE_NAME);
-
-		$criteria->add(TurnosPeer::ID, $pk);
-
-
-		$v = TurnosPeer::doSelect($criteria, $con);
-
-		return !empty($v) > 0 ? $v[0] : null;
-	}
-
-	
-	public static function retrieveByPKs($pks, $con = null)
-	{
-		if ($con === null) {
-			$con = Propel::getConnection(self::DATABASE_NAME);
-		}
-
-		$objs = null;
-		if (empty($pks)) {
-			$objs = array();
-		} else {
-			$criteria = new Criteria();
-			$criteria->add(TurnosPeer::ID, $pks, Criteria::IN);
-			$objs = TurnosPeer::doSelect($criteria, $con);
-		}
-		return $objs;
-	}
-
-} 
-if (Propel::isInit()) {
-			try {
-		BaseTurnosPeer::getMapBuilder();
-	} catch (Exception $e) {
-		Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
-	}
-} else {
-			require_once 'lib/model/map/TurnosMapBuilder.php';
-	Propel::registerMapBuilder('lib.model.map.TurnosMapBuilder');
-}




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