2008/12/15 Davy Brion <[email protected]>

> do you mean we would only take care of this in Artorius? and not in the
> current code?
>
> because for me, this issue is rather blocking... we use MultiCriteria in my
> current project in a lot of places, often with paged queries, so i wouldn't
> be able to upgrade to NH 2.1 if that release does not use Artorius.


No Davy... (apparently my English is a disaster)
I mean....
This is my proposal:
"Transform" positional parameters to "NamedParameter" with a certain name
as: nhp1__01, nhp1__02...
when a positional parameter is used in a MultiCriteria or MultiQuery the
name will be
Query1: nhp1__01, nhp1__02....
Query2: nhp2__01, nhp2__02....

That is my proposal to solve it in trunk.

Then...... I'm thinking to apply this solution for the QueryTranslator in
Artorius (where possible) because the actual implementation of mix
positional+named parameter is a PITA.


>
> On Mon, Dec 15, 2008 at 10:18 PM, Fabio Maulo <[email protected]>wrote:
>
>> Ok... I have an idea about this problem since various month and probably
>> is the time to apply it even if it mean a deviation...My proposal is:
>> "Transform" positional parameters to "NamedParameter" with a certain name
>> as: nhp1__01, nhp1__02...
>> when a positional parameter is used in a MultiCriteria or MultiQuery the
>> name will be
>> Query1: nhp1__01, nhp1__02....
>> Query2: nhp2__01, nhp2__02....
>>
>> I'm thinking to manage it in this way in Artorius
>>
>> thoughts?
>>
>>
>> 2008/12/15 Davy Brion <[email protected]>
>>
>> yes, it was introduced in revision 3860 by the following change:
>>>
>>>         void ISqlStringVisitor.Parameter()
>>>         {
>>>             string name = formatter.GetParameterName(parameterIndex);
>>>             parameterIndex++;
>>>             result.Append(name);
>>>         }
>>>
>>> which was changed to this:
>>>
>>>         void ISqlStringVisitor.Parameter(Parameter parameter)
>>>         {
>>>             string name = formatter.GetParameterName(
>>>                 parameter.OriginalPositionInQuery ?? parameterIndex);
>>>             parameterIndex++;
>>>             result.Append(name);
>>>         }
>>>
>>> the change was necessary to get some really complex paging with order by
>>> queries working, but it did unfortunately also break paging parameters in
>>> certain multicriteria situations
>>>
>>>
>>> On Mon, Dec 15, 2008 at 10:04 PM, Tuna Toksöz <[email protected]> wrote:
>>>
>>>> Davy do you know if this issue existed before new 2005 dialect proposal?
>>>>
>>>>
>>>> On Mon, Dec 15, 2008 at 10:32 PM, Davy Brion <[email protected]>wrote:
>>>>
>>>>> well not sure if it's exactly the same... in my issue, the parameters
>>>>> are also ordered incorrectly, but in the other direction and only when 
>>>>> using
>>>>> MultiCriteria (and probably MultiQuery as well)
>>>>>
>>>>> i have a possible fix in mind, which i'm going to try soon, but it
>>>>> would be somewhat specific to the MultiCriteria/MultiQuery situation
>>>>>
>>>>>
>>>>> On Mon, Dec 15, 2008 at 9:30 PM, Tuna Toksöz <[email protected]>wrote:
>>>>>
>>>>>> probably. So moving previous as a subtask of your issue.
>>>>>>
>>>>>>
>>>>>> On Mon, Dec 15, 2008 at 10:29 PM, Davy Brion <[email protected]>wrote:
>>>>>>
>>>>>>> hmm, this also appears to be related to an issue i created earlier
>>>>>>> today:
>>>>>>> http://jira.nhibernate.org/browse/NH-1609
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Dec 15, 2008 at 9:17 PM, Tuna Toksöz <[email protected]>wrote:
>>>>>>>
>>>>>>>> http://jira.nhibernate.org/browse/NH-1610
>>>>>>>>
>>>>>>>> Here is the issue, add it to your watch list so you can track.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Dec 15, 2008 at 10:13 PM, Diego Jancic <[email protected]>wrote:
>>>>>>>>
>>>>>>>>>  Sure I will (not at work now, but I'm gonna do it tomorrow)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> *From:* [email protected] [mailto:
>>>>>>>>> [email protected]] *On Behalf Of *Tuna
>>>>>>>>> Toksöz
>>>>>>>>> *Sent:* Monday, December 15, 2008 18:07
>>>>>>>>> *To:* [email protected]
>>>>>>>>> *Subject:* [nhibernate-development] Re: Parameters Bug
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Yes that was it! I am going to reopen the issue, btw eventhough it
>>>>>>>>> maynot be related can you update to revision 3945 and see what 
>>>>>>>>> happens?
>>>>>>>>>
>>>>>>>>> On Mon, Dec 15, 2008 at 10:02 PM, Diego Jancic <[email protected]>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> René André suggested a changed (in the same issue), which was never
>>>>>>>>> applied.
>>>>>>>>> File: src\NHibernate\SqlCommand\SqlString.cs, line: 27
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Tuna Toksöz
>>>>>>>>> http://tunatoksoz.com
>>>>>>>>>
>>>>>>>>> Typos included to enhance the readers attention!
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Tuna Toksöz
>>>>>>>> http://tunatoksoz.com
>>>>>>>>
>>>>>>>> Typos included to enhance the readers attention!
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Davy Brion
>>>>>>> http://davybrion.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Tuna Toksöz
>>>>>> http://tunatoksoz.com
>>>>>>
>>>>>> Typos included to enhance the readers attention!
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Davy Brion
>>>>> http://davybrion.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Tuna Toksöz
>>>> http://tunatoksoz.com
>>>>
>>>> Typos included to enhance the readers attention!
>>>>
>>>>
>>>
>>>
>>> --
>>> Davy Brion
>>> http://davybrion.com
>>>
>>
>>
>>
>> --
>> Fabio Maulo
>>
>
>
>
> --
> Davy Brion
> http://davybrion.com
>



-- 
Fabio Maulo

Reply via email to