Great tip, thanks.

On Oct 5, 10:40 am, Luigi Dallavalle <[email protected]>
wrote:
> I use this snippet to check all my mappings, it basically loop through
> all the mapped classes
>
>                 IDictionary<string, IClassMetadata> allClassMetadata =
> session.SessionFactory.GetAllClassMetadata();
>
>                 foreach (KeyValuePair<string, IClassMetadata> entry in
> allClassMetadata)
>                 {
>
> session.CreateCriteria(entry.Value.GetMappedClass(EntityMode.Poco)).SetMaxResults(1).List();
>                 }
>
> Luigi
>
> On 5 Ott, 08:30, alexey_baranov <[email protected]> wrote:
>
> > Hi!
>
> > We are doing access subsistem and need some reflection option. Is it
> > possible to ask NHibernate a list of all mapped types?
>
> > Thanks!

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