title: How can I have associations with objects that have the same key ("Id") using .Net Ria Services?
body: <p>Say I have two classes and have a requirement that the primary key property must be named "Id" (example: Book and Publisher). The requirement is because I'm working with our companies code generated objects and can't change the way they are generated. These classes have a a foreign key between them: Book to Publisher and is a one to one relationship, where in this case, each Book only has one Publisher.</p>
  
  <p>In order to use Book.Publisher as a property in .Net RIA Services, you need to add the attributes.
  For example in the meta data for the Book class:<br />
  [Key]
  public int Id;
  ...
  [Include]<br />
  [Association("Book_Publisher", "Id", "Id", IsForeignKey = true)]<br />
  public Publisher Publisher;<br />
  <br />
  In the meta data for the publisher class:<br />
  [Key]<br />
  public int Id;<br />
  ...<br /></p>
  
  <p>In the client code I attempt to get the Publisher:
  Publisher booksPublisher = Book.Publisher; 
  But I get the wrong publisher (or a null). After looking at the database, the Publisher id is it looking for is the id of the book, not the publisher. </p>
  
  <p>Can I add an alias in the meta data? Will later versions of RIA Services handle this?</p>
  
  <p>Thank you.</p>