As Fabio said, Fluent NHibernate (and I assume ConfORM) can handle
this easily.

You can either turn your audit fields into a component, then map that
component using a ComponentMap (http://wiki.fluentnhibernate.org/
Fluent_mapping#ComponentMap.3CT.3E) which allows you to define a
component in a single location and reuse that mapping throughout your
domain.

Another approach, as was suggested earlier in this thread, is to just
create a regular ClassMap<T> mapping and subclass it for each of your
entities. Pretty simple stuff really.

On Sep 4, 8:10 am, harshil hameed <[email protected]> wrote:
> thanx for all,
>
> but Dietrich,ididnt get u realy.
> "*Wrap those properties into an embedded object* and map that separately,"
>
> do u mean, Create a Abstract class, and abstract Mapping file with that,
> All other mapping file ,will extent abstract mapping file,
> All other Entity class,will inherit this abstract class
>
> but my doubt is ,*Abstract mapping file*,(such a concept is really in NH)
>
>
>
> On Sat, Sep 4, 2010 at 10:15 AM, Dietrich <[email protected]> wrote:
> > Wrap those properties into an embedded object and map that separately,
> > maybe?
>
> > On Sep 3, 2:57 am, harshil <[email protected]> wrote:
> > > I have more than 400 mapping files,
>
> > > here near 150 mapping files have four common properties,
> > > (like  'Created User', 'Created Date','Modified User' and 'Modified
> > > Date'.)
>
> > > I want to avoid duplication of those mapping properties.
>
> > --
> > 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]<nhusers%[email protected] 
> > >
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/nhusers?hl=en.

-- 
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