On Mar 12, 1:40 pm, bzurer <[email protected]> wrote:
> I am using the AspNetSqlMembershipProvider and the tables that it uses
> in my application.
> When a user registers on the site I am also creating a User object
> which is mapped to my own User table.
> I want to generate a foreign key to the UserId column of the
> aspnet_Membership table but I don't want to create a class mapped to
> that table.
>
> I know that I can probably do that using <databaseobject> but is there
> another way?
>
> Thanks
>
> Robert
Have you looked into using the <join> clause in the mapping?
We currently have the following mapping:
<class name="OurUserType" table="dbo.aspnet_Users">
<id name="UserId">
<generator class="guid"/>
</id>
...
<join table="UserSetting" optional="true">
<key column="UserID"/>
<property for some property in the OurUserType class./>
</join>
<class>
/Oskar
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---