Sorry it was a typo, I changed lastPasswordChangeDate to
lastPasswordChangedDate and it worked. Details, details..


dCyphr wrote:
> 
> I'm having trouble passing the constructor arguments from iBatis. I keep
> getting:
> 
> Cannot find an appropriate constructor which map parameters in class:
> MembershipUser
> 
> This is what I have:
> Code:
> MembershipUser user =
> DataMapper.Membership.QueryForObject("select-username", "someuser99") as
> MembershipUser;
> 
> Xml:
>     <alias>
>       <typeAlias alias="User" type="System.Web.Security.MembershipUser,
> System.Web, Version=2.0.0.0, Culture=neutral,
> PublicKeyToken=b03f5f7f11d50a3a" />
>     </alias>
> 
>     <resultMaps>
>       <resultMap id="UserResult" class="User">
>         <constructor>
>           <argument argumentName="providerName" column="ProviderName"
> type="string" dbType="VarChar" nullValue="SiteMembership" />
>           <argument argumentName="name" column="UserName" type="string"
> dbType="VarChar" />
>           <argument argumentName="providerUserKey" column="UserID"
> type="object" dbType="VarChar" />
>           <argument argumentName="email" column="Email" type="string"
> dbType="VarChar" />
>           <argument argumentName="passwordQuestion"
> column="PasswordQuestion" type="string" dbType="VarChar" />
>           <argument argumentName="comment" column="Comment" type="string"
> dbType="VarChar" />
>           <argument argumentName="isApproved" column="IsApproved"
> type="bool" dbType="Boolean" />
>           <argument argumentName="isLockedOut" column="IsLockedOut"
> type="bool" dbType="Boolean" />
>           <argument argumentName="creationDate" column="CreationDate"
> type="dateTime" dbType="Date" />
>           <argument argumentName="lastLoginDate" column="LastLoginDate"
> type="dateTime" dbType="Date" />
>           <argument argumentName="lastActivityDate"
> column="LastActivityDate" type="dateTime" dbType="Date" />
>           <argument argumentName="lastPasswordChangeDate"
> column="LastPasswordChanged" type="dateTime" dbType="Date" />
>           <argument argumentName="lastLockoutDate"
> column="LastLockoutDate" type="dateTime" dbType="Date" />
>         </constructor>
>       </resultMap>
>     </resultMaps>
> 
>       <select id="select-username" parameterClass="string"
> resultMap="UserResult">
>         SELECT *
>         FROM Users
>         WHERE UserName = #value#
>       </select>
> 
> I've been banging my head against the wall all day trying to figure out
> what I
> ve been doing wrong. Can anyone help?
> 

-- 
View this message in context: 
http://www.nabble.com/Cannot-find-an-appropriate-constructor-which-map-parameters-in-class%3A-MembershipUser-tp16149616p16182173.html
Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.

Reply via email to