I'd create a user function that returned "SiteMembership" so you
wouldn't have to change all .xml files if you ever need to change the
text of that
Select field1, field2, ...., GetProviderName() as providerName, .....
CREATE FUNCTION dbo.GetProviderName()
RETURNS nvarchar...
AS
BEGIN
RETURN("SiteMembership")
END
-----Original Message-----
From: dCyphr [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 11:20 AM
To: [email protected]
Subject: Re: How do I embed constants in ResultMaps/ParamaterMaps?
Thanks, that worked like a charm!
Jakub Scheibe wrote:
>
> U can always try with sql
>
> select field1, field2 ..., "SitemMembership" as providerName, field5
from
> ...
>
> On 20/03/2008, dCyphr <[EMAIL PROTECTED]> wrote:
>>
>>
>> Say I have a constant value that I want the result map to populate
the
>> class
>> with, is there any way to do this? I tried the following but none
worked:
>>
>> <argument argumentName="providerName" column="" type="string"
>> nullValue="SiteMembership" />
>> <argument argumentName="providerName" type="string"
>> nullValue="SiteMembership" />
>>
>> See there is no column in my database, but I want to populate the
class
>> "providerName" with "SiteMembership" string. Is this possible?
>>
>> --
>> View this message in context:
>>
http://www.nabble.com/How-do-I-embed-constants-in-ResultMaps-ParamaterMa
ps--tp16182239p16182239.html
>> Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/How-do-I-embed-constants-in-ResultMaps-ParamaterMa
ps--tp16182239p16184209.html
Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.