Que tal raza... necesito de su apoyo para hacer que este QueryOver
Sume un dato y lo agrupe
Alumno alu = null;
Ayudantia Ayu = null;
IQueryOver<Ayudantia, Ayudantia> Reporte =
sesion.QueryOver<Ayudantia>(() => Ayu)
.JoinAlias(() => Ayu.Alumnos, () => alu)
.Where(() => Ayu.Alumnos == alu.Pago)
.And(() => Ayu.Inicio >= fecha_inicio)
.And(() => Ayu.Fin <= fecha_fin)
.AndRestrictionOn(() => Ayu.Status).IsLike("Aceptado")
.OrderBy(() => Ayu.NoDepto).Asc
.OrderBy(() => alu.Matricula).Asc;
Alumno.hbm.xml
class name="Alumno">
<id name="POID" unsaved-value="0">
<generator class="hilo" />
</id>
<property name="Matricula" type="string" length="11" />
<property name="Paterno" type="string" length="50" />
<property name="Materno" type="string" length="50" />
<property name="Nombre" type="string" length="100" />
<property name="NoCuenta" type="Int64" />
<property name="JDE" type="Int32" />
<bag name="Pago" cascade="all-delete-orphan">
<key column="PagoID" />
<one-to-many class="Ayudantia" />
</bag>
</class>
Ayudantia.hbm.xml
<class name="Ayudantia">
<id name="POID" unsaved-value="0">
<generator class="hilo" />
</id>
<property name="NoDepto" type="int" />
<property name="NombreDepto" type="string" />
<property name="NumeroNegocio" type="string" />
<property name="Hora" type="int" />
<property name="Campus" type="string" />
<property name="Importe" type="decimal(18,2)" />
<property name="Inicio" type="date" />
<property name="Fin" type="date" />
<property name="Status" type="string" />
<many-to-one name="Alumnos" column="PagoID" />
</class>
saludos
--
Para escribir al Grupo, hágalo a esta dirección:
[email protected]
Para más, visite: http://groups.google.com/group/NHibernate-Hispano