[Alba-desarrollo] SVN Alba r4852 - in prosistem/alba/trunk/alba:
apps/principal/modules/horarioescolar/actions
apps/principal/modules/horarioescolar/templates
apps/principal/modules/horarioescolar/validate config
lib/model/map lib/model/om
commits en pressenter.com.ar
commits en pressenter.com.ar
Vie Jul 20 19:18:53 CEST 2007
Author: josx
Date: 2007-07-20 14:18:47 -0300 (Fri, 20 Jul 2007)
New Revision: 4852
Added:
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_actions.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_footer.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_form.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_header.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_messages.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_actions.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_footer.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_header.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_messages.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_td_tabular.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_th_tabular.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/editSuccess.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/listSuccess.php
Modified:
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/actions/actions.class.php
prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/validate/edit.yml
prosistem/alba/trunk/alba/config/schema.yml
prosistem/alba/trunk/alba/lib/model/map/DocenteMapBuilder.php
prosistem/alba/trunk/alba/lib/model/map/HorarioescolarMapBuilder.php
prosistem/alba/trunk/alba/lib/model/om/BaseAlumno.php
prosistem/alba/trunk/alba/lib/model/om/BaseDocente.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
prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php
prosistem/alba/trunk/alba/lib/model/om/BaseTurnos.php
Log:
Se agrego la seleccion de eventos a horarioescolar
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-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/actions/actions.class.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -38,12 +38,41 @@
$this->vista = $this->getRequestParameter('vista');
}
- protected function updateHorarioescolarFromRequest(){
- $horarioescolar = $this->getRequestParameter('horarioescolar');
- $horarioescolar['hora_inicio'] = $this->_add_zeros($horarioescolar['hora_inicio']['hour'],2).":".$this->_add_zeros($horarioescolar['hora_inicio']['minute'],2)." ".$horarioescolar['hora_inicio']['ampm'];
- $horarioescolar['hora_fin']= $this->_add_zeros($horarioescolar['hora_fin']['hour'],2).":".$this->_add_zeros($horarioescolar['hora_fin']['minute'],2)." ".$horarioescolar['hora_fin']['ampm'];
+ public function executeEdit() {
+ $evento_generico = new miEvento();
+ $this->horarioescolar = $this->getHorarioescolarOrCreate();
+ $this->evento = $evento_generico->getEventoOrCreate($this->horarioescolar->getFkEventoId());
+ if ($this->getRequest()->getMethod() == sfRequest::POST) {
+ $this->evento = $evento_generico->updateEventoFromRequest($this->evento, $this->getRequestParameter('evento'), $this->getUser()->getCulture());
+ $this->evento->save();
+ $this->forward404Unless($this->evento);
+ $this->updateHorarioescolarFromRequest($this->evento->getId());
+ $this->saveHorarioescolar($this->horarioescolar);
+ $this->setFlash('notice', 'Your modifications have been saved');
+ if ($this->getRequestParameter('save_and_add')) {
+ return $this->redirect('horarioescolar/create');
+ } else if ($this->getRequestParameter('save_and_list')) {
+ return $this->redirect('horarioescolar/list');
+ } else {
+ return $this->redirect('horarioescolar/edit?id='.$this->horarioescolar->getId());
+ }
+ } else {
+ $this->labels = $this->getLabels();
+ }
+ }
+
+
+ protected function updateHorarioescolarFromRequest($fk_evento_id = '') {
+ $horarioescolar = $this->getRequestParameter('horarioescolar');
+
+ if ($fk_evento_id) {
+ $this->horarioescolar->setFkEventoId($fk_evento_id);
+ } else {
+ $this->horarioescolar->setFkEventoId(null);
+ }
+
if (isset($horarioescolar['nombre']))
{
$this->horarioescolar->setNombre($horarioescolar['nombre']);
@@ -52,18 +81,6 @@
{
$this->horarioescolar->setDescripcion($horarioescolar['descripcion']);
}
- if (isset($horarioescolar['dia']))
- {
- $this->horarioescolar->setDia($horarioescolar['dia']);
- }
- if (isset($horarioescolar['hora_inicio']))
- {
- $this->horarioescolar->setHoraInicio($horarioescolar['hora_inicio']);
- }
- if (isset($horarioescolar['hora_fin']))
- {
- $this->horarioescolar->setHoraFin($horarioescolar['hora_fin']);
- }
if (isset($horarioescolar['fk_horarioescolartipo_id']))
{
$this->horarioescolar->setFkHorarioescolartipoId($horarioescolar['fk_horarioescolartipo_id']);
@@ -76,8 +93,6 @@
{
$this->horarioescolar->setFkTurnosId($horarioescolar['fk_turnos_id']);
}
-
-
}
@@ -132,7 +147,7 @@
$ciclolectivos = CiclolectivoPeer::doSelect($criteria);
$optionsCiclolectivo = array();
foreach ($ciclolectivos as $ciclolectivo) {
- $optionsCiclolectivo[$ciclolectivo->getId()] = $ciclolectivo->getDescripcion();
+ $optionsCiclolectivo[$ciclolectivo->getId()] = $ciclolectivo->getDescripcion();
}
asort($optionsCiclolectivo);
@@ -247,6 +262,15 @@
}
-
+ protected function getLabels()
+ {
+ return array(
+ 'horarioescolar{nombre}' => 'Nombre:',
+ 'horarioescolar{descripcion}' => 'Descripcion:',
+ 'horarioescolar{fk_horarioescolartipo_id}' => 'Tipo Horario Escolar:',
+ 'horarioescolar{fk_turnos_id}' => 'Turno:',
+ 'horarioescolar{fk_evento_id}' => 'Evento:',
+ );
+ }
}
?>
\ No newline at end of file
Added: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_actions.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_actions.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_actions.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -0,0 +1,17 @@
+<?php
+// auto-generated by sfPropelAdmin
+// date: 2007/07/18 17:55:34
+?>
+<ul class="sf_admin_actions">
+ <li><?php echo button_to(__('list'), 'horarioescolar/list?id='.$horarioescolar->getId(), array (
+ 'class' => 'sf_admin_action_list',
+)) ?></li>
+ <li><?php echo submit_tag(__('save'), array (
+ 'name' => 'save',
+ 'class' => 'sf_admin_action_save',
+)) ?></li>
+ <li><?php echo submit_tag(__('save and add'), array (
+ 'name' => 'save_and_add',
+ 'class' => 'sf_admin_action_save_and_add',
+)) ?></li>
+</ul>
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_actions.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_footer.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_footer.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_footer.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -0,0 +1,4 @@
+<?php
+// auto-generated by sfPropelAdmin
+// date: 2007/07/18 17:55:34
+?>
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_footer.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: 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-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_form.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -0,0 +1,89 @@
+<?php
+// auto-generated by sfPropelAdmin
+// date: 2007/07/18 17:55:34
+?>
+<?php echo form_tag('horarioescolar/save', array(
+ 'id' => 'sf_admin_edit_form',
+ 'name' => 'sf_admin_edit_form',
+ 'multipart' => true,
+)) ?>
+
+<?php echo object_input_hidden_tag($horarioescolar, 'getId') ?>
+
+<fieldset id="sf_fieldset_none" class="">
+
+<div class="form-row">
+ <?php echo label_for('horarioescolar[nombre]', __($labels['horarioescolar{nombre}']), 'class="required" ') ?>
+ <div class="content<?php if ($sf_request->hasError('horarioescolar{nombre}')): ?> form-error<?php endif; ?>">
+ <?php if ($sf_request->hasError('horarioescolar{nombre}')): ?>
+ <?php echo form_error('horarioescolar{nombre}', array('class' => 'form-error-msg')) ?>
+ <?php endif; ?>
+
+ <?php $value = object_input_tag($horarioescolar, 'getNombre', array (
+ 'size' => 64,
+ 'control_name' => 'horarioescolar[nombre]',
+)); echo $value ? $value : ' ' ?>
+ </div>
+</div>
+
+<div class="form-row">
+ <?php echo label_for('horarioescolar[descripcion]', __($labels['horarioescolar{descripcion}']), '') ?>
+ <div class="content<?php if ($sf_request->hasError('horarioescolar{descripcion}')): ?> form-error<?php endif; ?>">
+ <?php if ($sf_request->hasError('horarioescolar{descripcion}')): ?>
+ <?php echo form_error('horarioescolar{descripcion}', array('class' => 'form-error-msg')) ?>
+ <?php endif; ?>
+
+ <?php $value = object_input_tag($horarioescolar, 'getDescripcion', array (
+ 'size' => 64,
+ 'control_name' => 'horarioescolar[descripcion]',
+)); echo $value ? $value : ' ' ?>
+ </div>
+</div>
+
+
+<?php include_partial('evento/carga_evento', array('horarioescolar' => $horarioescolar, 'evento' => $evento)) ?>
+
+
+
+
+
+<div class="form-row">
+ <?php echo label_for('horarioescolar[fk_horarioescolartipo_id]', __($labels['horarioescolar{fk_horarioescolartipo_id}']), 'class="required" ') ?>
+ <div class="content<?php if ($sf_request->hasError('horarioescolar{fk_horarioescolartipo_id}')): ?> form-error<?php endif; ?>">
+ <?php if ($sf_request->hasError('horarioescolar{fk_horarioescolartipo_id}')): ?>
+ <?php echo form_error('horarioescolar{fk_horarioescolartipo_id}', array('class' => 'form-error-msg')) ?>
+ <?php endif; ?>
+
+ <?php $value = object_select_tag($horarioescolar, 'getFkHorarioescolartipoId', array (
+ 'related_class' => 'Horarioescolartipo',
+ 'control_name' => 'horarioescolar[fk_horarioescolartipo_id]',
+)); echo $value ? $value : ' ' ?>
+ </div>
+</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 endif; ?>
+
+ <?php $value = get_partial('fk_turnos_id', array('type' => 'edit', 'horarioescolar' => $horarioescolar)); echo $value ? $value : ' ' ?>
+ </div>
+</div>
+
+</fieldset>
+
+<?php include_partial('edit_actions', array('horarioescolar' => $horarioescolar)) ?>
+
+</form>
+
+<ul class="sf_admin_actions">
+ <li class="float-left"><?php if ($horarioescolar->getId()): ?>
+<?php echo button_to(__('delete'), 'horarioescolar/delete?id='.$horarioescolar->getId(), array (
+ 'post' => true,
+ 'confirm' => __('Are you sure?'),
+ 'class' => 'sf_admin_action_delete',
+)) ?><?php endif; ?>
+</li>
+ </ul>
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_form.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_header.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_header.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_header.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -0,0 +1,4 @@
+<?php
+// auto-generated by sfPropelAdmin
+// date: 2007/07/18 17:55:34
+?>
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_header.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_messages.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_messages.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_messages.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -0,0 +1,19 @@
+<?php
+// auto-generated by sfPropelAdmin
+// date: 2007/07/18 17:55:34
+?>
+<?php if ($sf_request->hasErrors()): ?>
+<div class="form-errors">
+<h2><?php echo __('There are some errors that prevent the form to validate') ?></h2>
+<dl>
+<?php foreach ($sf_request->getErrorNames() as $name): ?>
+ <dt><?php echo __($labels[$name]) ?></dt>
+ <dd><?php echo $sf_request->getError($name) ?></dd>
+<?php endforeach; ?>
+</dl>
+</div>
+<?php elseif ($sf_flash->has('notice')): ?>
+<div class="save-ok">
+<h2><?php echo __($sf_flash->get('notice')) ?></h2>
+</div>
+<?php endif; ?>
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_edit_messages.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -0,0 +1,38 @@
+<?php
+// auto-generated by sfPropelAdmin
+// date: 2007/07/18 17:55:34
+?>
+<table cellspacing="0" class="sf_admin_list">
+<thead>
+<tr>
+<?php include_partial('list_th_tabular') ?>
+ <th id="sf_admin_list_th_sf_actions"><?php echo __('Actions') ?></th>
+</tr>
+</thead>
+<tbody>
+<?php $i = 1; foreach ($pager->getResults() as $horarioescolar): $odd = fmod(++$i, 2) ?>
+<tr class="sf_admin_row_<?php echo $odd ?>">
+<?php include_partial('list_td_tabular', array('horarioescolar' => $horarioescolar)) ?>
+<?php include_partial('list_td_actions', array('horarioescolar' => $horarioescolar)) ?>
+</tr>
+<?php endforeach; ?>
+</tbody>
+<tfoot>
+<tr><th colspan="9">
+<div class="float-right">
+<?php if ($pager->haveToPaginate()): ?>
+ <?php echo link_to(image_tag(sfConfig::get('sf_admin_web_dir').'/images/first.png', array('align' => 'absmiddle', 'alt' => __('First'), 'title' => __('First'))), 'horarioescolar/list?page=1') ?>
+ <?php echo link_to(image_tag(sfConfig::get('sf_admin_web_dir').'/images/previous.png', array('align' => 'absmiddle', 'alt' => __('Previous'), 'title' => __('Previous'))), 'horarioescolar/list?page='.$pager->getPreviousPage()) ?>
+
+ <?php foreach ($pager->getLinks() as $page): ?>
+ <?php echo link_to_unless($page == $pager->getPage(), $page, 'horarioescolar/list?page='.$page) ?>
+ <?php endforeach; ?>
+
+ <?php echo link_to(image_tag(sfConfig::get('sf_admin_web_dir').'/images/next.png', array('align' => 'absmiddle', 'alt' => __('Next'), 'title' => __('Next'))), 'horarioescolar/list?page='.$pager->getNextPage()) ?>
+ <?php echo link_to(image_tag(sfConfig::get('sf_admin_web_dir').'/images/last.png', array('align' => 'absmiddle', 'alt' => __('Last'), 'title' => __('Last'))), 'horarioescolar/list?page='.$pager->getLastPage()) ?>
+<?php endif; ?>
+</div>
+<?php echo format_number_choice('[0] no result|[1] 1 result|(1,+Inf] %1% results', array('%1%' => $pager->getNbResults()), $pager->getNbResults()) ?>
+</th></tr>
+</tfoot>
+</table>
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_actions.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_actions.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_actions.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -0,0 +1,12 @@
+<?php
+// auto-generated by sfPropelAdmin
+// date: 2007/07/18 17:55:34
+?>
+<ul class="sf_admin_actions">
+ <li><?php echo button_to(__('create'), 'horarioescolar/create', array (
+ 'class' => 'sf_admin_action_create',
+)) ?></li>
+ <li><?php echo button_to(__('Ver Calendario'), 'horarioescolar/mostrar', array (
+ 'style' => 'background: #ffc url(/sf/sf_admin/images/default_icon.png) no-repeat 3px 2px',
+)) ?></li>
+ </ul>
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_actions.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_footer.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_footer.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_footer.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -0,0 +1,4 @@
+<?php
+// auto-generated by sfPropelAdmin
+// date: 2007/07/18 17:55:34
+?>
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_footer.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_header.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_header.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_header.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -0,0 +1,4 @@
+<?php
+// auto-generated by sfPropelAdmin
+// date: 2007/07/18 17:55:34
+?>
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_header.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_messages.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_messages.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_messages.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -0,0 +1,12 @@
+<?php
+// auto-generated by sfPropelAdmin
+// date: 2007/07/18 17:55:34
+?>
+<?php if ($sf_request->getError('delete')): ?>
+<div class="form-errors">
+ <h2>Could not delete the selected Horarioescolar</h2>
+ <ul>
+ <li><?php echo $sf_request->getError('delete') ?></li>
+ </ul>
+</div>
+<?php endif; ?>
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_messages.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_td_tabular.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_td_tabular.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_td_tabular.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -0,0 +1,11 @@
+<?php
+// auto-generated by sfPropelAdmin
+// date: 2007/07/18 17:55:34
+?>
+ <td><?php echo link_to($horarioescolar->getNombre() ? $horarioescolar->getNombre() : __('-'), 'horarioescolar/edit?id='.$horarioescolar->getId()) ?></td>
+ <td><?php echo $horarioescolar->getDescripcion() ?></td>
+ <td><?php echo ($horarioescolar->getEvento())?$horarioescolar->getEvento()->getInfoEnTexto():"";?></td>
+ <td><?php echo get_partial('fk_horarioescolartipo_id', array('type' => 'list', 'horarioescolar' => $horarioescolar)) ?></td>
+ <td><?php echo get_partial('fk_establecimiento_id', array('type' => 'list', 'horarioescolar' => $horarioescolar)) ?></td>
+ <td><?php echo get_partial('turnos_list', array('type' => 'list', 'horarioescolar' => $horarioescolar)) ?></td>
+
\ No newline at end of file
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_td_tabular.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_th_tabular.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_th_tabular.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_th_tabular.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -0,0 +1,42 @@
+<?php
+// auto-generated by sfPropelAdmin
+// date: 2007/07/18 17:55:34
+?>
+ <th id="sf_admin_list_th_nombre">
+ <?php if ($sf_user->getAttribute('sort', null, 'sf_admin/horarioescolar/sort') == 'nombre'): ?>
+ <?php echo link_to(__('Nombre'), 'horarioescolar/list?sort=nombre&type='.($sf_user->getAttribute('type', 'asc', 'sf_admin/horarioescolar/sort') == 'asc' ? 'desc' : 'asc')) ?>
+ (<?php echo __($sf_user->getAttribute('type', 'asc', 'sf_admin/horarioescolar/sort')) ?>)
+ <?php else: ?>
+ <?php echo link_to(__('Nombre'), 'horarioescolar/list?sort=nombre&type=asc') ?>
+ <?php endif; ?>
+ </th>
+ <th id="sf_admin_list_th_descripcion">
+ <?php if ($sf_user->getAttribute('sort', null, 'sf_admin/horarioescolar/sort') == 'descripcion'): ?>
+ <?php echo link_to(__('Descripcion'), 'horarioescolar/list?sort=descripcion&type='.($sf_user->getAttribute('type', 'asc', 'sf_admin/horarioescolar/sort') == 'asc' ? 'desc' : 'asc')) ?>
+ (<?php echo __($sf_user->getAttribute('type', 'asc', 'sf_admin/horarioescolar/sort')) ?>)
+ <?php else: ?>
+ <?php echo link_to(__('Descripcion'), 'horarioescolar/list?sort=descripcion&type=asc') ?>
+ <?php endif; ?>
+ </th>
+ <th id="sf_admin_list_th_dia_evento">
+ <?php echo __('Evento') ?>
+ </th>
+ <th id="sf_admin_list_th_fk_horarioescolartipo_id">
+ <?php if ($sf_user->getAttribute('sort', null, 'sf_admin/horarioescolar/sort') == 'fk_horarioescolartipo_id'): ?>
+ <?php echo link_to(__('Tipo Horario Escolar'), 'horarioescolar/list?sort=fk_horarioescolartipo_id&type='.($sf_user->getAttribute('type', 'asc', 'sf_admin/horarioescolar/sort') == 'asc' ? 'desc' : 'asc')) ?>
+ (<?php echo __($sf_user->getAttribute('type', 'asc', 'sf_admin/horarioescolar/sort')) ?>)
+ <?php else: ?>
+ <?php echo link_to(__('Tipo Horario Escolar'), 'horarioescolar/list?sort=fk_horarioescolartipo_id&type=asc') ?>
+ <?php endif; ?>
+ </th>
+ <th id="sf_admin_list_th_fk_establecimiento_id">
+ <?php if ($sf_user->getAttribute('sort', null, 'sf_admin/horarioescolar/sort') == 'fk_establecimiento_id'): ?>
+ <?php echo link_to(__('Establecimiento'), 'horarioescolar/list?sort=fk_establecimiento_id&type='.($sf_user->getAttribute('type', 'asc', 'sf_admin/horarioescolar/sort') == 'asc' ? 'desc' : 'asc')) ?>
+ (<?php echo __($sf_user->getAttribute('type', 'asc', 'sf_admin/horarioescolar/sort')) ?>)
+ <?php else: ?>
+ <?php echo link_to(__('Establecimiento'), 'horarioescolar/list?sort=fk_establecimiento_id&type=asc') ?>
+ <?php endif; ?>
+ </th>
+ <th id="sf_admin_list_th_turnos_list">
+ <?php echo __('Turno') ?>
+ </th>
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/_list_th_tabular.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/editSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/editSuccess.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/editSuccess.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -0,0 +1,27 @@
+<?php
+// auto-generated by sfPropelAdmin
+// date: 2007/07/18 17:55:34
+?>
+<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'Date') ?>
+
+<?php use_stylesheet('/sf/sf_admin/css/main') ?>
+
+<div id="sf_admin_container">
+
+<h1><?php echo __('Modificar Horario Escolar',
+array()) ?></h1>
+
+<div id="sf_admin_header">
+<?php include_partial('horarioescolar/edit_header', array('horarioescolar' => $horarioescolar)) ?>
+</div>
+
+<div id="sf_admin_content">
+<?php include_partial('horarioescolar/edit_messages', array('horarioescolar' => $horarioescolar, 'labels' => $labels)) ?>
+<?php include_partial('horarioescolar/edit_form', array('horarioescolar' => $horarioescolar, 'labels' => $labels, 'evento' => $evento)) ?>
+</div>
+
+<div id="sf_admin_footer">
+<?php include_partial('horarioescolar/edit_footer', array('horarioescolar' => $horarioescolar)) ?>
+</div>
+
+</div>
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/editSuccess.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Added: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/listSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/listSuccess.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/listSuccess.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -0,0 +1,35 @@
+<?php
+// auto-generated by sfPropelAdmin
+// date: 2007/07/18 17:55:34
+?>
+<?php use_helper('I18N', 'Date') ?>
+
+<?php use_stylesheet('/sf/sf_admin/css/main') ?>
+
+<div id="sf_admin_container">
+
+<h1><?php echo __('Listado de Horario Escolar',
+array()) ?></h1>
+
+<div id="sf_admin_header">
+<?php include_partial('horarioescolar/list_header', array('pager' => $pager)) ?>
+<?php include_partial('horarioescolar/list_messages', array('pager' => $pager)) ?>
+</div>
+
+<div id="sf_admin_bar">
+</div>
+
+<div id="sf_admin_content">
+<?php if (!$pager->getNbResults()): ?>
+<?php echo __('no result') ?>
+<?php else: ?>
+<?php include_partial('horarioescolar/list', array('pager' => $pager)) ?>
+<?php endif; ?>
+<?php include_partial('list_actions') ?>
+</div>
+
+<div id="sf_admin_footer">
+<?php include_partial('horarioescolar/list_footer', array('pager' => $pager)) ?>
+</div>
+
+</div>
Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/templates/listSuccess.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author URL Date Rev"
Modified: prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/validate/edit.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/validate/edit.yml 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/apps/principal/modules/horarioescolar/validate/edit.yml 2007-07-20 17:18:47 UTC (rev 4852)
@@ -1,8 +1,5 @@
methods:
post:
- - "horarioescolar{hora_inicio}"
- - "horarioescolar{hora_fin}"
- - "horarioescolar{dia}"
- "horarioescolar{nombre}"
- "horarioescolar{descripcion}"
- "horarioescolar{fk_turnos_id}"
@@ -12,21 +9,6 @@
enabled: on
names:
- horarioescolar{hora_inicio}:
- required: Yes
- required_msg: El campo hora inicio es obligatorio
- validators: horaInicio
-
- horarioescolar{hora_fin}:
- required: Yes
- required_msg: El campo hora fin es obligatorio
- validators: horaFin
-
- horarioescolar{dia}:
- required: Yes
- required_msg: El campo dia fin es obligatorio
- validators: validarNumero
-
horarioescolar{descripcion}:
required: No
validators: caracteresMaximos255
Modified: prosistem/alba/trunk/alba/config/schema.yml
===================================================================
--- prosistem/alba/trunk/alba/config/schema.yml 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/config/schema.yml 2007-07-20 17:18:47 UTC (rev 4852)
@@ -674,7 +674,7 @@
type: CHAR
size: 1
required: true
- default:
+# default:
email:
type: VARCHAR
size: 128
@@ -787,7 +787,7 @@
type: CHAR
size: 1
required: true
- default:
+# default:
email:
type: VARCHAR
size: 128
@@ -1547,8 +1547,8 @@
sexo:
type: CHAR
size: 1
- required: false
- default: U
+ required: true
+# default: U
fecha_nacimiento:
type: TIMESTAMP
required: true
@@ -1732,17 +1732,6 @@
required: true
autoIncrement: true
primaryKey: true
- dia:
- type: integer
- size: 11
- required: true
- default: 0
- hora_inicio:
- type: TIME
- required: true
- hora_fin:
- type: TIME
- required: true
nombre:
type: varchar
size: 128
@@ -1751,6 +1740,12 @@
type: varchar
size: 255
required: false
+ fk_evento_id:
+ type: INTEGER
+ required: true
+ default: 0
+ foreignTable: evento
+ foreignReference: id
fk_establecimiento_id:
type: INTEGER
required: true
Modified: prosistem/alba/trunk/alba/lib/model/map/DocenteMapBuilder.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/map/DocenteMapBuilder.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/lib/model/map/DocenteMapBuilder.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -38,7 +38,7 @@
$tMap->addColumn('NOMBRE', 'Nombre', 'string', CreoleTypes::VARCHAR, true, 128);
- $tMap->addColumn('SEXO', 'Sexo', 'string', CreoleTypes::CHAR, false, 1);
+ $tMap->addColumn('SEXO', 'Sexo', 'string', CreoleTypes::CHAR, true, 1);
$tMap->addColumn('FECHA_NACIMIENTO', 'FechaNacimiento', 'int', CreoleTypes::TIMESTAMP, true, null);
Modified: prosistem/alba/trunk/alba/lib/model/map/HorarioescolarMapBuilder.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/map/HorarioescolarMapBuilder.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/lib/model/map/HorarioescolarMapBuilder.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -34,16 +34,12 @@
$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, 11);
- $tMap->addColumn('DIA', 'Dia', 'int', CreoleTypes::INTEGER, true, 11);
-
- $tMap->addColumn('HORA_INICIO', 'HoraInicio', 'int', CreoleTypes::TIME, true, null);
-
- $tMap->addColumn('HORA_FIN', 'HoraFin', 'int', CreoleTypes::TIME, true, null);
-
$tMap->addColumn('NOMBRE', 'Nombre', 'string', CreoleTypes::VARCHAR, true, 128);
$tMap->addColumn('DESCRIPCION', 'Descripcion', 'string', CreoleTypes::VARCHAR, false, 255);
+ $tMap->addForeignKey('FK_EVENTO_ID', 'FkEventoId', 'int', CreoleTypes::INTEGER, 'evento', 'ID', true, null);
+
$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);
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseAlumno.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseAlumno.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseAlumno.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -57,7 +57,7 @@
- protected $sexo = 'null';
+ protected $sexo;
@@ -534,7 +534,7 @@
$v = (string) $v;
}
- if ($this->sexo !== $v || $v === 'null') {
+ if ($this->sexo !== $v) {
$this->sexo = $v;
$this->modifiedColumns[] = AlumnoPeer::SEXO;
}
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseDocente.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseDocente.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseDocente.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -21,7 +21,7 @@
- protected $sexo = 'U';
+ protected $sexo;
@@ -306,7 +306,7 @@
$v = (string) $v;
}
- if ($this->sexo !== $v || $v === 'U') {
+ if ($this->sexo !== $v) {
$this->sexo = $v;
$this->modifiedColumns[] = DocentePeer::SEXO;
}
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseEstablecimiento.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseEstablecimiento.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseEstablecimiento.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -1834,6 +1834,41 @@
+ 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_ESTABLECIMIENTO_ID, $this->getId());
+
+ $this->collHorarioescolars = HorarioescolarPeer::doSelectJoinEvento($criteria, $con);
+ }
+ } else {
+
+ $criteria->add(HorarioescolarPeer::FK_ESTABLECIMIENTO_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 getHorarioescolarsJoinTurnos($criteria = null, $con = null)
{
include_once 'lib/model/om/BaseHorarioescolarPeer.php';
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseEvento.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseEvento.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseEvento.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -60,6 +60,12 @@
protected $lastDocenteHorarioCriteria = null;
+ protected $collHorarioescolars;
+
+
+ protected $lastHorarioescolarCriteria = null;
+
+
protected $alreadyInSave = false;
@@ -424,6 +430,14 @@
}
}
+ if ($this->collHorarioescolars !== null) {
+ foreach($this->collHorarioescolars as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
$this->alreadyInSave = false;
}
return $affectedRows;
@@ -481,7 +495,15 @@
}
}
+ if ($this->collHorarioescolars !== null) {
+ foreach($this->collHorarioescolars as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
$this->alreadyInValidation = false;
}
@@ -688,6 +710,10 @@
$copyObj->addDocenteHorario($relObj->copy($deepCopy));
}
+ foreach($this->getHorarioescolars() as $relObj) {
+ $copyObj->addHorarioescolar($relObj->copy($deepCopy));
+ }
+
}
$copyObj->setNew(true);
@@ -1028,4 +1054,179 @@
return $this->collDocenteHorarios;
}
+
+ 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_EVENTO_ID, $this->getId());
+
+ HorarioescolarPeer::addSelectColumns($criteria);
+ $this->collHorarioescolars = HorarioescolarPeer::doSelect($criteria, $con);
+ }
+ } else {
+ if (!$this->isNew()) {
+
+
+ $criteria->add(HorarioescolarPeer::FK_EVENTO_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_EVENTO_ID, $this->getId());
+
+ return HorarioescolarPeer::doCount($criteria, $distinct, $con);
+ }
+
+
+ public function addHorarioescolar(Horarioescolar $l)
+ {
+ $this->collHorarioescolars[] = $l;
+ $l->setEvento($this);
+ }
+
+
+
+ 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_EVENTO_ID, $this->getId());
+
+ $this->collHorarioescolars = HorarioescolarPeer::doSelectJoinEstablecimiento($criteria, $con);
+ }
+ } else {
+
+ $criteria->add(HorarioescolarPeer::FK_EVENTO_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 getHorarioescolarsJoinTurnos($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_EVENTO_ID, $this->getId());
+
+ $this->collHorarioescolars = HorarioescolarPeer::doSelectJoinTurnos($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->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_EVENTO_ID, $this->getId());
+
+ $this->collHorarioescolars = HorarioescolarPeer::doSelectJoinHorarioescolartipo($criteria, $con);
+ }
+ } else {
+
+ $criteria->add(HorarioescolarPeer::FK_EVENTO_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
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolar.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolar.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolar.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -13,26 +13,18 @@
- protected $dia = 0;
+ protected $nombre;
- protected $hora_inicio;
+ protected $descripcion;
- protected $hora_fin;
+ protected $fk_evento_id = 0;
- protected $nombre;
-
-
-
- protected $descripcion;
-
-
-
protected $fk_establecimiento_id = 0;
@@ -44,6 +36,9 @@
protected $fk_horarioescolartipo_id = 0;
+ protected $aEvento;
+
+
protected $aEstablecimiento;
@@ -66,71 +61,27 @@
}
- public function getDia()
+ public function getNombre()
{
- return $this->dia;
+ return $this->nombre;
}
- public function getHoraInicio($format = 'H:i:s')
+ public function getDescripcion()
{
- 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);
- }
+ return $this->descripcion;
}
- public function getHoraFin($format = 'H:i:s')
+ public function getFkEventoId()
{
- 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);
- }
+ return $this->fk_evento_id;
}
- public function getNombre()
- {
-
- return $this->nombre;
- }
-
-
- public function getDescripcion()
- {
-
- return $this->descripcion;
- }
-
-
public function getFkEstablecimientoId()
{
@@ -166,54 +117,6 @@
}
- public function setDia($v)
- {
-
- if ($v !== null && !is_int($v) && is_numeric($v)) {
- $v = (int) $v;
- }
-
- if ($this->dia !== $v || $v === 0) {
- $this->dia = $v;
- $this->modifiedColumns[] = HorarioescolarPeer::DIA;
- }
-
- }
-
- 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[] = HorarioescolarPeer::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[] = HorarioescolarPeer::HORA_FIN;
- }
-
- }
-
public function setNombre($v)
{
@@ -242,6 +145,24 @@
}
+ public function setFkEventoId($v)
+ {
+
+ if ($v !== null && !is_int($v) && is_numeric($v)) {
+ $v = (int) $v;
+ }
+
+ if ($this->fk_evento_id !== $v || $v === 0) {
+ $this->fk_evento_id = $v;
+ $this->modifiedColumns[] = HorarioescolarPeer::FK_EVENTO_ID;
+ }
+
+ if ($this->aEvento !== null && $this->aEvento->getId() !== $v) {
+ $this->aEvento = null;
+ }
+
+ }
+
public function setFkEstablecimientoId($v)
{
@@ -302,27 +223,23 @@
$this->id = $rs->getInt($startcol + 0);
- $this->dia = $rs->getInt($startcol + 1);
+ $this->nombre = $rs->getString($startcol + 1);
- $this->hora_inicio = $rs->getTime($startcol + 2, null);
+ $this->descripcion = $rs->getString($startcol + 2);
- $this->hora_fin = $rs->getTime($startcol + 3, null);
+ $this->fk_evento_id = $rs->getInt($startcol + 3);
- $this->nombre = $rs->getString($startcol + 4);
+ $this->fk_establecimiento_id = $rs->getInt($startcol + 4);
- $this->descripcion = $rs->getString($startcol + 5);
+ $this->fk_turnos_id = $rs->getInt($startcol + 5);
- $this->fk_establecimiento_id = $rs->getInt($startcol + 6);
+ $this->fk_horarioescolartipo_id = $rs->getInt($startcol + 6);
- $this->fk_turnos_id = $rs->getInt($startcol + 7);
-
- $this->fk_horarioescolartipo_id = $rs->getInt($startcol + 8);
-
$this->resetModified();
$this->setNew(false);
- return $startcol + 9;
+ return $startcol + 7;
} catch (Exception $e) {
throw new PropelException("Error populating Horarioescolar object", $e);
}
@@ -380,6 +297,13 @@
+ if ($this->aEvento !== null) {
+ if ($this->aEvento->isModified()) {
+ $affectedRows += $this->aEvento->save($con);
+ }
+ $this->setEvento($this->aEvento);
+ }
+
if ($this->aEstablecimiento !== null) {
if ($this->aEstablecimiento->isModified()) {
$affectedRows += $this->aEstablecimiento->save($con);
@@ -450,6 +374,12 @@
+ if ($this->aEvento !== null) {
+ if (!$this->aEvento->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aEvento->getValidationFailures());
+ }
+ }
+
if ($this->aEstablecimiento !== null) {
if (!$this->aEstablecimiento->validate($columns)) {
$failureMap = array_merge($failureMap, $this->aEstablecimiento->getValidationFailures());
@@ -496,27 +426,21 @@
return $this->getId();
break;
case 1:
- return $this->getDia();
+ return $this->getNombre();
break;
case 2:
- return $this->getHoraInicio();
+ return $this->getDescripcion();
break;
case 3:
- return $this->getHoraFin();
+ return $this->getFkEventoId();
break;
case 4:
- return $this->getNombre();
- break;
- case 5:
- return $this->getDescripcion();
- break;
- case 6:
return $this->getFkEstablecimientoId();
break;
- case 7:
+ case 5:
return $this->getFkTurnosId();
break;
- case 8:
+ case 6:
return $this->getFkHorarioescolartipoId();
break;
default:
@@ -530,14 +454,12 @@
$keys = HorarioescolarPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getId(),
- $keys[1] => $this->getDia(),
- $keys[2] => $this->getHoraInicio(),
- $keys[3] => $this->getHoraFin(),
- $keys[4] => $this->getNombre(),
- $keys[5] => $this->getDescripcion(),
- $keys[6] => $this->getFkEstablecimientoId(),
- $keys[7] => $this->getFkTurnosId(),
- $keys[8] => $this->getFkHorarioescolartipoId(),
+ $keys[1] => $this->getNombre(),
+ $keys[2] => $this->getDescripcion(),
+ $keys[3] => $this->getFkEventoId(),
+ $keys[4] => $this->getFkEstablecimientoId(),
+ $keys[5] => $this->getFkTurnosId(),
+ $keys[6] => $this->getFkHorarioescolartipoId(),
);
return $result;
}
@@ -557,27 +479,21 @@
$this->setId($value);
break;
case 1:
- $this->setDia($value);
+ $this->setNombre($value);
break;
case 2:
- $this->setHoraInicio($value);
+ $this->setDescripcion($value);
break;
case 3:
- $this->setHoraFin($value);
+ $this->setFkEventoId($value);
break;
case 4:
- $this->setNombre($value);
- break;
- case 5:
- $this->setDescripcion($value);
- break;
- case 6:
$this->setFkEstablecimientoId($value);
break;
- case 7:
+ case 5:
$this->setFkTurnosId($value);
break;
- case 8:
+ case 6:
$this->setFkHorarioescolartipoId($value);
break;
} }
@@ -588,14 +504,12 @@
$keys = HorarioescolarPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
- if (array_key_exists($keys[1], $arr)) $this->setDia($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->setNombre($arr[$keys[4]]);
- if (array_key_exists($keys[5], $arr)) $this->setDescripcion($arr[$keys[5]]);
- if (array_key_exists($keys[6], $arr)) $this->setFkEstablecimientoId($arr[$keys[6]]);
- if (array_key_exists($keys[7], $arr)) $this->setFkTurnosId($arr[$keys[7]]);
- if (array_key_exists($keys[8], $arr)) $this->setFkHorarioescolartipoId($arr[$keys[8]]);
+ if (array_key_exists($keys[1], $arr)) $this->setNombre($arr[$keys[1]]);
+ 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[6], $arr)) $this->setFkHorarioescolartipoId($arr[$keys[6]]);
}
@@ -604,11 +518,9 @@
$criteria = new Criteria(HorarioescolarPeer::DATABASE_NAME);
if ($this->isColumnModified(HorarioescolarPeer::ID)) $criteria->add(HorarioescolarPeer::ID, $this->id);
- if ($this->isColumnModified(HorarioescolarPeer::DIA)) $criteria->add(HorarioescolarPeer::DIA, $this->dia);
- if ($this->isColumnModified(HorarioescolarPeer::HORA_INICIO)) $criteria->add(HorarioescolarPeer::HORA_INICIO, $this->hora_inicio);
- if ($this->isColumnModified(HorarioescolarPeer::HORA_FIN)) $criteria->add(HorarioescolarPeer::HORA_FIN, $this->hora_fin);
if ($this->isColumnModified(HorarioescolarPeer::NOMBRE)) $criteria->add(HorarioescolarPeer::NOMBRE, $this->nombre);
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_HORARIOESCOLARTIPO_ID)) $criteria->add(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, $this->fk_horarioescolartipo_id);
@@ -642,16 +554,12 @@
public function copyInto($copyObj, $deepCopy = false)
{
- $copyObj->setDia($this->dia);
-
- $copyObj->setHoraInicio($this->hora_inicio);
-
- $copyObj->setHoraFin($this->hora_fin);
-
$copyObj->setNombre($this->nombre);
$copyObj->setDescripcion($this->descripcion);
+ $copyObj->setFkEventoId($this->fk_evento_id);
+
$copyObj->setFkEstablecimientoId($this->fk_establecimiento_id);
$copyObj->setFkTurnosId($this->fk_turnos_id);
@@ -683,6 +591,36 @@
}
+ public function setEvento($v)
+ {
+
+
+ if ($v === null) {
+ $this->setFkEventoId('0');
+ } else {
+ $this->setFkEventoId($v->getId());
+ }
+
+
+ $this->aEvento = $v;
+ }
+
+
+
+ public function getEvento($con = null)
+ {
+ include_once 'lib/model/om/BaseEventoPeer.php';
+
+ if ($this->aEvento === null && ($this->fk_evento_id !== null)) {
+
+ $this->aEvento = EventoPeer::retrieveByPK($this->fk_evento_id, $con);
+
+
+ }
+ return $this->aEvento;
+ }
+
+
public function setEstablecimiento($v)
{
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolarPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolarPeer.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolarPeer.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -13,7 +13,7 @@
const CLASS_DEFAULT = 'lib.model.Horarioescolar';
- const NUM_COLUMNS = 9;
+ const NUM_COLUMNS = 7;
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -23,21 +23,15 @@
const ID = 'horarioescolar.ID';
- const DIA = 'horarioescolar.DIA';
+ const NOMBRE = 'horarioescolar.NOMBRE';
- const HORA_INICIO = 'horarioescolar.HORA_INICIO';
+ const DESCRIPCION = 'horarioescolar.DESCRIPCION';
- const HORA_FIN = 'horarioescolar.HORA_FIN';
+ const FK_EVENTO_ID = 'horarioescolar.FK_EVENTO_ID';
- const NOMBRE = 'horarioescolar.NOMBRE';
-
-
- const DESCRIPCION = 'horarioescolar.DESCRIPCION';
-
-
const FK_ESTABLECIMIENTO_ID = 'horarioescolar.FK_ESTABLECIMIENTO_ID';
@@ -52,18 +46,18 @@
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('Id', 'Dia', 'HoraInicio', 'HoraFin', 'Nombre', 'Descripcion', 'FkEstablecimientoId', 'FkTurnosId', 'FkHorarioescolartipoId', ),
- BasePeer::TYPE_COLNAME => array (HorarioescolarPeer::ID, HorarioescolarPeer::DIA, HorarioescolarPeer::HORA_INICIO, HorarioescolarPeer::HORA_FIN, HorarioescolarPeer::NOMBRE, HorarioescolarPeer::DESCRIPCION, HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, HorarioescolarPeer::FK_TURNOS_ID, HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'dia', 'hora_inicio', 'hora_fin', 'nombre', 'descripcion', 'fk_establecimiento_id', 'fk_turnos_id', 'fk_horarioescolartipo_id', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, )
+ 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_NUM => array (0, 1, 2, 3, 4, 5, 6, )
);
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Dia' => 1, 'HoraInicio' => 2, 'HoraFin' => 3, 'Nombre' => 4, 'Descripcion' => 5, 'FkEstablecimientoId' => 6, 'FkTurnosId' => 7, 'FkHorarioescolartipoId' => 8, ),
- BasePeer::TYPE_COLNAME => array (HorarioescolarPeer::ID => 0, HorarioescolarPeer::DIA => 1, HorarioescolarPeer::HORA_INICIO => 2, HorarioescolarPeer::HORA_FIN => 3, HorarioescolarPeer::NOMBRE => 4, HorarioescolarPeer::DESCRIPCION => 5, HorarioescolarPeer::FK_ESTABLECIMIENTO_ID => 6, HorarioescolarPeer::FK_TURNOS_ID => 7, HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID => 8, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'dia' => 1, 'hora_inicio' => 2, 'hora_fin' => 3, 'nombre' => 4, 'descripcion' => 5, 'fk_establecimiento_id' => 6, 'fk_turnos_id' => 7, 'fk_horarioescolartipo_id' => 8, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, )
+ 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_NUM => array (0, 1, 2, 3, 4, 5, 6, )
);
@@ -119,16 +113,12 @@
$criteria->addSelectColumn(HorarioescolarPeer::ID);
- $criteria->addSelectColumn(HorarioescolarPeer::DIA);
-
- $criteria->addSelectColumn(HorarioescolarPeer::HORA_INICIO);
-
- $criteria->addSelectColumn(HorarioescolarPeer::HORA_FIN);
-
$criteria->addSelectColumn(HorarioescolarPeer::NOMBRE);
$criteria->addSelectColumn(HorarioescolarPeer::DESCRIPCION);
+ $criteria->addSelectColumn(HorarioescolarPeer::FK_EVENTO_ID);
+
$criteria->addSelectColumn(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID);
$criteria->addSelectColumn(HorarioescolarPeer::FK_TURNOS_ID);
@@ -214,6 +204,34 @@
}
+ public static function doCountJoinEvento(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $criteria = clone $criteria;
+
+ $criteria->clearSelectColumns()->clearOrderByColumns();
+ if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->addSelectColumn(HorarioescolarPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(HorarioescolarPeer::COUNT);
+ }
+
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(HorarioescolarPeer::FK_EVENTO_ID, EventoPeer::ID);
+
+ $rs = HorarioescolarPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ return 0;
+ }
+ }
+
+
+
public static function doCountJoinEstablecimiento(Criteria $criteria, $distinct = false, $con = null)
{
$criteria = clone $criteria;
@@ -298,6 +316,53 @@
+ public static function doSelectJoinEvento(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ HorarioescolarPeer::addSelectColumns($c);
+ $startcol = (HorarioescolarPeer::NUM_COLUMNS - HorarioescolarPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ EventoPeer::addSelectColumns($c);
+
+ $c->addJoin(HorarioescolarPeer::FK_EVENTO_ID, EventoPeer::ID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = HorarioescolarPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = EventoPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getEvento(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addHorarioescolar($obj1); break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initHorarioescolars();
+ $obj2->addHorarioescolar($obj1); }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+
public static function doSelectJoinEstablecimiento(Criteria $c, $con = null)
{
$c = clone $c;
@@ -455,6 +520,8 @@
$criteria->addSelectColumn($column);
}
+ $criteria->addJoin(HorarioescolarPeer::FK_EVENTO_ID, EventoPeer::ID);
+
$criteria->addJoin(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, EstablecimientoPeer::ID);
$criteria->addJoin(HorarioescolarPeer::FK_TURNOS_ID, TurnosPeer::ID);
@@ -482,15 +549,20 @@
HorarioescolarPeer::addSelectColumns($c);
$startcol2 = (HorarioescolarPeer::NUM_COLUMNS - HorarioescolarPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ EventoPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + EventoPeer::NUM_COLUMNS;
+
EstablecimientoPeer::addSelectColumns($c);
- $startcol3 = $startcol2 + EstablecimientoPeer::NUM_COLUMNS;
+ $startcol4 = $startcol3 + EstablecimientoPeer::NUM_COLUMNS;
TurnosPeer::addSelectColumns($c);
- $startcol4 = $startcol3 + TurnosPeer::NUM_COLUMNS;
+ $startcol5 = $startcol4 + TurnosPeer::NUM_COLUMNS;
HorarioescolartipoPeer::addSelectColumns($c);
- $startcol5 = $startcol4 + HorarioescolartipoPeer::NUM_COLUMNS;
+ $startcol6 = $startcol5 + HorarioescolartipoPeer::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);
@@ -511,7 +583,7 @@
- $omClass = EstablecimientoPeer::getOMClass();
+ $omClass = EventoPeer::getOMClass();
$cls = Propel::import($omClass);
@@ -521,7 +593,7 @@
$newObject = true;
for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
$temp_obj1 = $results[$j];
- $temp_obj2 = $temp_obj1->getEstablecimiento(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $temp_obj2 = $temp_obj1->getEvento(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
$newObject = false;
$temp_obj2->addHorarioescolar($obj1); break;
}
@@ -534,7 +606,7 @@
- $omClass = TurnosPeer::getOMClass();
+ $omClass = EstablecimientoPeer::getOMClass();
$cls = Propel::import($omClass);
@@ -544,7 +616,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->getEstablecimiento(); if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
$newObject = false;
$temp_obj3->addHorarioescolar($obj1); break;
}
@@ -557,7 +629,7 @@
- $omClass = HorarioescolartipoPeer::getOMClass();
+ $omClass = TurnosPeer::getOMClass();
$cls = Propel::import($omClass);
@@ -567,7 +639,7 @@
$newObject = true;
for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
$temp_obj1 = $results[$j];
- $temp_obj4 = $temp_obj1->getHorarioescolartipo(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
+ $temp_obj4 = $temp_obj1->getTurnos(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
$newObject = false;
$temp_obj4->addHorarioescolar($obj1); break;
}
@@ -578,6 +650,29 @@
$obj4->addHorarioescolar($obj1);
}
+
+
+ $omClass = HorarioescolartipoPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj5 = new $cls();
+ $obj5->hydrate($rs, $startcol5);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj5 = $temp_obj1->getHorarioescolartipo(); if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj5->addHorarioescolar($obj1); break;
+ }
+ }
+
+ if ($newObject) {
+ $obj5->initHorarioescolars();
+ $obj5->addHorarioescolar($obj1);
+ }
+
$results[] = $obj1;
}
return $results;
@@ -585,6 +680,38 @@
+ public static function doCountJoinAllExceptEvento(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $criteria = clone $criteria;
+
+ $criteria->clearSelectColumns()->clearOrderByColumns();
+ if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->addSelectColumn(HorarioescolarPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(HorarioescolarPeer::COUNT);
+ }
+
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, EstablecimientoPeer::ID);
+
+ $criteria->addJoin(HorarioescolarPeer::FK_TURNOS_ID, TurnosPeer::ID);
+
+ $criteria->addJoin(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, HorarioescolartipoPeer::ID);
+
+ $rs = HorarioescolarPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ return 0;
+ }
+ }
+
+
+
public static function doCountJoinAllExceptEstablecimiento(Criteria $criteria, $distinct = false, $con = null)
{
$criteria = clone $criteria;
@@ -601,6 +728,8 @@
$criteria->addSelectColumn($column);
}
+ $criteria->addJoin(HorarioescolarPeer::FK_EVENTO_ID, EventoPeer::ID);
+
$criteria->addJoin(HorarioescolarPeer::FK_TURNOS_ID, TurnosPeer::ID);
$criteria->addJoin(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, HorarioescolartipoPeer::ID);
@@ -631,6 +760,8 @@
$criteria->addSelectColumn($column);
}
+ $criteria->addJoin(HorarioescolarPeer::FK_EVENTO_ID, EventoPeer::ID);
+
$criteria->addJoin(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, EstablecimientoPeer::ID);
$criteria->addJoin(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, HorarioescolartipoPeer::ID);
@@ -661,6 +792,8 @@
$criteria->addSelectColumn($column);
}
+ $criteria->addJoin(HorarioescolarPeer::FK_EVENTO_ID, EventoPeer::ID);
+
$criteria->addJoin(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, EstablecimientoPeer::ID);
$criteria->addJoin(HorarioescolarPeer::FK_TURNOS_ID, TurnosPeer::ID);
@@ -675,7 +808,7 @@
- public static function doSelectJoinAllExceptEstablecimiento(Criteria $c, $con = null)
+ public static function doSelectJoinAllExceptEvento(Criteria $c, $con = null)
{
$c = clone $c;
@@ -686,12 +819,17 @@
HorarioescolarPeer::addSelectColumns($c);
$startcol2 = (HorarioescolarPeer::NUM_COLUMNS - HorarioescolarPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ EstablecimientoPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + EstablecimientoPeer::NUM_COLUMNS;
+
TurnosPeer::addSelectColumns($c);
- $startcol3 = $startcol2 + TurnosPeer::NUM_COLUMNS;
+ $startcol4 = $startcol3 + TurnosPeer::NUM_COLUMNS;
HorarioescolartipoPeer::addSelectColumns($c);
- $startcol4 = $startcol3 + HorarioescolartipoPeer::NUM_COLUMNS;
+ $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_HORARIOESCOLARTIPO_ID, HorarioescolartipoPeer::ID);
@@ -708,7 +846,7 @@
$obj1 = new $cls();
$obj1->hydrate($rs);
- $omClass = TurnosPeer::getOMClass();
+ $omClass = EstablecimientoPeer::getOMClass();
$cls = Propel::import($omClass);
@@ -718,7 +856,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->getEstablecimiento(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
$newObject = false;
$temp_obj2->addHorarioescolar($obj1);
break;
@@ -730,17 +868,128 @@
$obj2->addHorarioescolar($obj1);
}
+ $omClass = TurnosPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj3 = new $cls();
+ $obj3->hydrate($rs, $startcol3);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj3 = $temp_obj1->getTurnos(); if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj3->addHorarioescolar($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj3->initHorarioescolars();
+ $obj3->addHorarioescolar($obj1);
+ }
+
$omClass = HorarioescolartipoPeer::getOMClass();
$cls = Propel::import($omClass);
+ $obj4 = new $cls();
+ $obj4->hydrate($rs, $startcol4);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj4 = $temp_obj1->getHorarioescolartipo(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj4->addHorarioescolar($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj4->initHorarioescolars();
+ $obj4->addHorarioescolar($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+
+ public static function doSelectJoinAllExceptEstablecimiento(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ HorarioescolarPeer::addSelectColumns($c);
+ $startcol2 = (HorarioescolarPeer::NUM_COLUMNS - HorarioescolarPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ EventoPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + EventoPeer::NUM_COLUMNS;
+
+ TurnosPeer::addSelectColumns($c);
+ $startcol4 = $startcol3 + TurnosPeer::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_HORARIOESCOLARTIPO_ID, HorarioescolartipoPeer::ID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = HorarioescolarPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = EventoPeer::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->getEvento(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addHorarioescolar($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initHorarioescolars();
+ $obj2->addHorarioescolar($obj1);
+ }
+
+ $omClass = TurnosPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
$obj3 = new $cls();
$obj3->hydrate($rs, $startcol3);
$newObject = true;
for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
$temp_obj1 = $results[$j];
- $temp_obj3 = $temp_obj1->getHorarioescolartipo(); if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+ $temp_obj3 = $temp_obj1->getTurnos(); if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
$newObject = false;
$temp_obj3->addHorarioescolar($obj1);
break;
@@ -752,6 +1001,28 @@
$obj3->addHorarioescolar($obj1);
}
+ $omClass = HorarioescolartipoPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj4 = new $cls();
+ $obj4->hydrate($rs, $startcol4);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj4 = $temp_obj1->getHorarioescolartipo(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj4->addHorarioescolar($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj4->initHorarioescolars();
+ $obj4->addHorarioescolar($obj1);
+ }
+
$results[] = $obj1;
}
return $results;
@@ -770,12 +1041,17 @@
HorarioescolarPeer::addSelectColumns($c);
$startcol2 = (HorarioescolarPeer::NUM_COLUMNS - HorarioescolarPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ EventoPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + EventoPeer::NUM_COLUMNS;
+
EstablecimientoPeer::addSelectColumns($c);
- $startcol3 = $startcol2 + EstablecimientoPeer::NUM_COLUMNS;
+ $startcol4 = $startcol3 + EstablecimientoPeer::NUM_COLUMNS;
HorarioescolartipoPeer::addSelectColumns($c);
- $startcol4 = $startcol3 + HorarioescolartipoPeer::NUM_COLUMNS;
+ $startcol5 = $startcol4 + HorarioescolartipoPeer::NUM_COLUMNS;
+ $c->addJoin(HorarioescolarPeer::FK_EVENTO_ID, EventoPeer::ID);
+
$c->addJoin(HorarioescolarPeer::FK_ESTABLECIMIENTO_ID, EstablecimientoPeer::ID);
$c->addJoin(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_ID, HorarioescolartipoPeer::ID);
@@ -792,7 +1068,7 @@
$obj1 = new $cls();
$obj1->hydrate($rs);
- $omClass = EstablecimientoPeer::getOMClass();
+ $omClass = EventoPeer::getOMClass();
$cls = Propel::import($omClass);
@@ -802,7 +1078,7 @@
$newObject = true;
for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
$temp_obj1 = $results[$j];
- $temp_obj2 = $temp_obj1->getEstablecimiento(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $temp_obj2 = $temp_obj1->getEvento(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
$newObject = false;
$temp_obj2->addHorarioescolar($obj1);
break;
@@ -814,7 +1090,7 @@
$obj2->addHorarioescolar($obj1);
}
- $omClass = HorarioescolartipoPeer::getOMClass();
+ $omClass = EstablecimientoPeer::getOMClass();
$cls = Propel::import($omClass);
@@ -824,7 +1100,7 @@
$newObject = true;
for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
$temp_obj1 = $results[$j];
- $temp_obj3 = $temp_obj1->getHorarioescolartipo(); if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+ $temp_obj3 = $temp_obj1->getEstablecimiento(); if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
$newObject = false;
$temp_obj3->addHorarioescolar($obj1);
break;
@@ -836,6 +1112,28 @@
$obj3->addHorarioescolar($obj1);
}
+ $omClass = HorarioescolartipoPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj4 = new $cls();
+ $obj4->hydrate($rs, $startcol4);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj4 = $temp_obj1->getHorarioescolartipo(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj4->addHorarioescolar($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj4->initHorarioescolars();
+ $obj4->addHorarioescolar($obj1);
+ }
+
$results[] = $obj1;
}
return $results;
@@ -854,12 +1152,17 @@
HorarioescolarPeer::addSelectColumns($c);
$startcol2 = (HorarioescolarPeer::NUM_COLUMNS - HorarioescolarPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ EventoPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + EventoPeer::NUM_COLUMNS;
+
EstablecimientoPeer::addSelectColumns($c);
- $startcol3 = $startcol2 + EstablecimientoPeer::NUM_COLUMNS;
+ $startcol4 = $startcol3 + EstablecimientoPeer::NUM_COLUMNS;
TurnosPeer::addSelectColumns($c);
- $startcol4 = $startcol3 + TurnosPeer::NUM_COLUMNS;
+ $startcol5 = $startcol4 + TurnosPeer::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);
@@ -876,7 +1179,7 @@
$obj1 = new $cls();
$obj1->hydrate($rs);
- $omClass = EstablecimientoPeer::getOMClass();
+ $omClass = EventoPeer::getOMClass();
$cls = Propel::import($omClass);
@@ -886,7 +1189,7 @@
$newObject = true;
for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
$temp_obj1 = $results[$j];
- $temp_obj2 = $temp_obj1->getEstablecimiento(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $temp_obj2 = $temp_obj1->getEvento(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
$newObject = false;
$temp_obj2->addHorarioescolar($obj1);
break;
@@ -898,7 +1201,7 @@
$obj2->addHorarioescolar($obj1);
}
- $omClass = TurnosPeer::getOMClass();
+ $omClass = EstablecimientoPeer::getOMClass();
$cls = Propel::import($omClass);
@@ -908,7 +1211,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->getEstablecimiento(); if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
$newObject = false;
$temp_obj3->addHorarioescolar($obj1);
break;
@@ -920,6 +1223,28 @@
$obj3->addHorarioescolar($obj1);
}
+ $omClass = TurnosPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj4 = new $cls();
+ $obj4->hydrate($rs, $startcol4);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj4 = $temp_obj1->getTurnos(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj4->addHorarioescolar($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj4->initHorarioescolars();
+ $obj4->addHorarioescolar($obj1);
+ }
+
$results[] = $obj1;
}
return $results;
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolartipo.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolartipo.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseHorarioescolartipo.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -457,6 +457,41 @@
+ 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_HORARIOESCOLARTIPO_ID, $this->getId());
+
+ $this->collHorarioescolars = HorarioescolarPeer::doSelectJoinEvento($criteria, $con);
+ }
+ } else {
+
+ $criteria->add(HorarioescolarPeer::FK_HORARIOESCOLARTIPO_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';
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -53,7 +53,7 @@
- protected $sexo = 'null';
+ protected $sexo;
@@ -388,7 +388,7 @@
$v = (string) $v;
}
- if ($this->sexo !== $v || $v === 'null') {
+ if ($this->sexo !== $v) {
$this->sexo = $v;
$this->modifiedColumns[] = ResponsablePeer::SEXO;
}
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseTurnos.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseTurnos.php 2007-07-20 17:16:17 UTC (rev 4851)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseTurnos.php 2007-07-20 17:18:47 UTC (rev 4852)
@@ -754,6 +754,41 @@
+ 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';
Más información sobre la lista de distribución Alba-desarrollo