Buenas!!!
Estoy realizando unas clases donde tengo herencia para ocultar algunas
propiedades en determinado momento.
Entonce tengo 2 archivos hbm el primero es
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class
name="Kof.ar.ReportAutomatic.Bussines.ReportBase,Kof.ar.ReportAutomatic"
table="Report">
<id name="Id" column="Id" type="Guid" unsaved-
value="00000000-0000-0000-0000-000000000000">
<generator class="guid"/>
</id>
<property column="Name" type="String" name="Name"
not-null="true"
length="500" />
<property column="Path" type="String" name="Path"
not-null="true"
length="500" />
<property column="ToUser" type="String" name="ToUser" not-
null="true" length="50" />
<property column="Active" type="Boolean" name="Active" not-
null="true" />
<property column="CreationUser" type="String"
name="CreationUser"
not-null="true" length="50" />
<property column="CreationDate" type="DateTime"
name="CreationDate"
not-null="true" />
<property column="ModificationUser" type="String"
name="ModificationUser" not-null="true" length="50" />
<property column="ModificationDate" type="DateTime"
name="ModificationDate" not-null="true" />
</class>
</hibernate-mapping>
y el segundo
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class
name="Kof.ar.ReportAutomatic.Bussines.Report,Kof.ar.ReportAutomatic"
table="Report">
<id name="Id" column="Id" type="Guid" unsaved-
value="00000000-0000-0000-0000-000000000000">
<generator class="guid"/>
</id>
<property column="Name" type="String" name="Name"
not-null="true"
length="500" />
<property column="Path" type="String" name="Path"
not-null="true"
length="500" />
<property column="ToUser" type="String" name="ToUser" not-
null="true" length="50" />
<bag name="Parameters" cascade="all-delete-orphan"
inverse="true"
lazy="true" >
<key column="Report" />
<one-to-many
class="Kof.ar.ReportAutomatic.Bussines.ReportParameter,Kof.ar.ReportAutomatic"/
>
</bag>
<property column="ExecuteInterval" type="String"
name="ExecuteInterval" length="2" />
<property column="ExecuteDate" type="DateTime"
name="ExecuteDate"
not-null="false" />
<property column="ExecuteHour" type="DateTime"
name="ExecuteHour"
not-null="false" />
<property column="Active" type="Boolean" name="Active" not-
null="true" />
<property column="CreationUser" type="String"
name="CreationUser"
not-null="true" length="50" />
<property column="CreationDate" type="DateTime"
name="CreationDate"
not-null="true" />
<property column="ModificationUser" type="String"
name="ModificationUser" not-null="true" length="50" />
<property column="ModificationDate" type="DateTime"
name="ModificationDate" not-null="true" />
</class>
</hibernate-mapping>
En defnitiva oculto alguans propiedades si? pero cuanto hago un
criteria del primer tipo (ReportBase) y realizo un List() me trae los
objetos duplicados, en un mismo ilist trae ReportBase y Report!
Por donde puedo chusmear sobre herencia y Nhibernate y si alguno ya
puede decirme que estoy haciendo mal además del link parfa chusmear
sería buenísimo!!!
Desde ya muchas gracias!!!!!
--~--~---------~--~----~------------~-------~--~----~
Para escribir al Grupo, hágalo a esta dirección:
[email protected]
Para más, visite: http://groups.google.com/group/NHibernate-Hispano
-~----------~----~----~----~------~----~------~--~---