String concatenation or something like uNhAddIns DynQuery that is an
obscured string concatenation but allow

new Select("f.Name,
f.Description").From(typeof(Foo).Name).Where("f.Name like :pName");


2009/8/4 Tuna Toksoz <[email protected]>

> string concatenation is your friend, in this case.and if it is the only
> typename that disturbs you, i wouldn't call it magic string, seriously.
>
> Tuna Toksöz
> Eternal sunshine of the open source mind.
>
> http://devlicio.us/blogs/tuna_toksoz
> http://tunatoksoz.com
> http://twitter.com/tehlike
>
>
>
>
>
> On Wed, Aug 5, 2009 at 12:56 AM, Richard Dingwall <[email protected]>wrote:
>
>>
>> I have an HQL query that includes a fully-qualified type name
>> OsmTaskDecorator:
>>
>> IQuery query = this.session.CreateQuery(
>>    @"select task.DueAt
>>    from XYZ.Domain.Osm.Practicing.OsmTaskDecorator decorator
>>         join decorator.task as task
>>         join decorator.Grades as report
>>         join report.grades as grade
>>    where grade.Employee = :employee
>>          and grade.Skill = :skill
>>          and grade.IsPass = true
>>    order by task.DueAt desc")
>>    .SetParameter<Employee>("employee", employee)
>>    .SetParameter<Skill>("skill", skill);
>>
>> This is a magic string - if I rename or move OsmTaskDecorator to
>> another namespace, this HQL will break. Is there any way to substitute
>> this type name in from typeof(OsmTaskDecorator).Name, other than
>> String.Format?
>>
>> Cheers,
>> Rich
>>
>>
>
> >
>


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