Re: Fwd: [nhusers] Getting entity type from ICriteria

"Ayende Rahien" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nhibernate.devel
Message-ID <[email protected]>
I took a look at this, and I agree that it is not nice to use.

>From my understanding, Entity Name allows us to map a single type to several
mapping, under different names.
For that matter, it seems like it doesn't have to be a type, it can be just
a hash table.

Given that, I don't think that this make sense anymore. Which is annoying,
because it is a very useful thing.
On the other hand, it means that a lot of things that I used to do as addon
to NH can now be done using it directly.

I exposed EntityOrClassName in DetachedCriteria, which should be enough to
make it possible to make it work in most situations.

That said, since this is a fairly rare feature, it may be worth considering
adding the type directly when it exists.

On Fri, Jun 6, 2008 at 5:17 PM, Fabio Maulo <[email protected]> wrote:

> 2008/6/6 Mike Nichols <[email protected]>:
>
>> And yes all I was concerned with was either getting the EntityOrClassName
>> or the Type somehow.
>> mike
>
>
> Ok Mike.
> Please create a JIRA for the improvement.
>
> Take care with your code because the EntityOrClassName mean exactly
> EntityOrClassName and not "ClassName".
> The way to know the Type is:
> Type entityType =
> ((ISessionFactoryImplementor)sessionFactory).GetEntityPersister(entityOrClassName).GetMappedClass(EntityMode.Poco);
>
> Like you can see the thing is not so easy anymore because NH, in a soon
> future, can manage an entity in different ways.
>
> --
> Fabio Maulo
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Nhibernate-development mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nhibernate-development
>
>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

_______________________________________________
Nhibernate-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nhibernate-development
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.