Hi

I have this relationsship

User Table:
int UserId primary key,


Blog Table:
int BlogId primary key,
int UserId foreign key

One user can only have one blog.

I have tried with OneToOne on both side, but the profiler shows it
want to join on both primary keys. I have also tried

class User
{
   [OneToOne]
   public virtual Blog Blog {get; set;}
}

class Blog
{
   [BelongsTo("UserId")]
   public virtual User User {get; set;}
}


with same result. Is the only solution to use HasMany and BelongsTo

--~--~---------~--~----~------------~-------~--~----~
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=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to