and now you can even use the entity-name in HQLThe post about it is
http://fabiomaulo.blogspot.com/2008/10/entity-name-in-action-entity.html
<http://fabiomaulo.blogspot.com/2008/10/entity-name-in-action-entity.html>It
is a little bit old... the new is that now you don't need to specify the
entityName in save update and so on

2009/8/26 misterbill <[email protected]>

>
> Thanks that worked: Just to clarify for anyone else the mappings look
> like:
>
> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
>                   assembly="Sage.Domain.Entities"
>                    namespace="AMEC.EE.Sage.Domain.Entities.App">
> ...
>
>   <class name="AMEC.EE.Sage.Domain.Entities.MetaElement`1[[IUnitObj]]"
>         entity-name="UnitMetaElement"
>        table="UnitsMeta"
>       schema="App"
>       lazy="false"
>       dynamic-insert="true"
>       dynamic-update="true"
>       select-before-update="true">
> ...
>
> <set name="metaData"
>         lazy="false"
>         access="field"
>         generic="true"
>         cascade="all-delete-orphan"
>         inverse="true">
>      <key column="UnitRowID"/>
>       <one-to-many entity-name="UnitMetaElement" />
>    </set>
>
> and the info logging:
> INFO  - Mapping class: AMEC.EE.Sage.Domain.Entities.App.UnitObj ->
> Units
> INFO  - Mapping class: UnitMetaElement -> UnitsMeta
>
> On Aug 26, 3:58 pm, Fabio Maulo <[email protected]> wrote:
> > entity-name
> >
> > 2009/8/26 misterbill <[email protected]>
> >
> >
> >
> >
> >
> >
> >
> > > Just wanted to add, that this works as well:
> > > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
> > >                    assembly="Sage.Domain.Entities, Version=2.0.0.0,
> > > Culture=neutral, PublicKeyToken=null"
> > >                    namespace="AMEC.EE.Sage.Domain.Entities.App">
> > > ...
> > >    <set name="metaData"
> > >         lazy="false"
> > >          access="field"
> > >         generic="true"
> > >         cascade="all-delete-orphan"
> > >         inverse="true">
> > >      <key column="UnitRowID"/>
> > >      <one-to-many class="AMEC.EE.Sage.Domain.Entities.MetaElement`1
> > > [[IUnitObj]]" />
> > >    </set>
> > > ...
> >
> > > Still, it's going to be a pain down the line when mapping classes
> > > within different DLLs
> >
> > --
> > Fabio Maulo- Hide quoted text -
> >
> > - Show quoted text -
> >
>


-- 
Fabio Maulo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to