title: Entity Framework Core + MariaDB - Navigation Property is null
body: <p>I have a many-to-many relationship defined using a table in MariaDB. I am trying to use Navigation Properties in Entity Framework Core for the related entities, but they're not hydrated. </p>
  
  <p><code>roles</code></p>
  
  <pre><code>| role_id | role_name |
  | 1       |  Role-A   |
  | 2       |  Role-B   |
  </code></pre>
  
  <p><code>groups</code></p>
  
  <pre><code>| group_id |  group_name |
  |  1       |   Group-A   |
  |  2       |   Group-B   |
  </code></pre>
  
  <p><code>role_to_group</code></p>
  
  <pre><code>|  role_to_group_id   |   role_id  | group_id |
  |          1          |    1       |   1      |
  |          2          |    2       |   1      |
  |          3          |    2       |   2      |
  </code></pre>
  
  <p>This is the class</p>
  
  <pre><code>[Table(name: "role_to_group")]
  public class RoleToGroup
  {
      [Column(name: "role_to_group_id")]
      public long RoleToGroupId { get; set; }
  
      [Column(name: "role_id")]
      [ForeignKey("RGToRoles")]
      public int RoleId { get; set; }
  
      [Column(name: "group_id")]
      public int UserGroupId { get; set; }
  
      [Include]
      public Role Role { get; set; }
      [Include]
      public UserGroup UserGroup { get; set; }
  }
  </code></pre>
  
  <p>The <code>[Include]</code> is a custom defined attribute for hydrating the navigation properties using the pattern similar to <code>DbContext.Set&lt;T&gt;().Include("property_name")</code> via an extension method that does reflection on <code>T</code> and finds all properties with the attribute <code>[Include]</code> defined on them.</p>
  
  <p>However, I am unable to get this to work correctly. The navigation properties <code>Role</code> and <code>UserGroup</code> return null. </p>
  
  <p>What do you suggest I am doing wrong? Also please let me know if you need any more details to be added to the question!!</p>