Re: Optional type in criteria

"Craig Neuwirt" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nhibernate.devel
Message-ID <[email protected]>
Yeah, throwing makes more sense.

On Fri, Jun 27, 2008 at 10:19 AM, Ayende Rahien <[email protected]> wrote:

> It would return a type, and I think it should throw in this case.
>
>
> On Fri, Jun 27, 2008 at 6:16 PM, Will Shaver <[email protected]>
> wrote:
>
>> I've taken to wrapping the Criteria class for this and other reasons. I'd
>> be in favor of bringing it back, it seems like there is a lot of value.
>>
>> Would you have your OptionalRootClass throw an exception if it doesn't
>> exist or return an empty string?
>>
>> On Fri, Jun 27, 2008 at 8:13 AM, Ayende Rahien <[email protected]> wrote:
>>
>>> The introduction of EntityName has cause several issues for users of NH.
>>> Specifically, there are several frameworks that relies on things like:
>>>
>>> Query.Execute( DetachedCriteria.For<Foo>() );
>>>
>>> They use the DC to get the type, from the type get the current session,
>>> etc. The problem is that without the type, you can't get the session, which
>>> doesn't leave you any option to do the "proper" resolution.
>>> Since in many scenarios, we construct DC with type, I suggest bringing
>>> back the type name, with a name that clarify that it is optional.
>>> Maybe something like OptionalRootClass
>>>
>>> -------------------------------------------------------------------------
>>> 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
>>
>>
>
> -------------------------------------------------------------------------
> 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.