Yes, but you should use it the other way round. In this example, no
user can exist without profile (it needs the foreign key as its ID),
but the profile can exist without the user. For me, that violates all
I know about users and profiles.

-Markus

2009/11/11 jeroenh <[email protected]>:
> Found the answer... One of the two Primary keys should obviously be of
> type 'PrimaryKeyType.ForeignKey'.
>
>>
>>     [ActiveRecord]
>>     public class TestUser : ActiveRecordBase<TestUser>
>>     {
>>         [PrimaryKey(PrimaryKeyType.Foreign)] // !! NOT GuidComb!
>>         public Guid Id { get; set; }
>>
>>         [OneToOne(Cascade = CascadeEnum.All, Fetch = FetchEnum.Join)]
>>         public TestUserProfile Profile { get; set; }
>>
>>     }
>>
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Castle Project Users" 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/castle-project-users?hl=.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=.


Reply via email to