We're currently trying SQLite Extentions (PCL) as an ORM.
We're wondering if the mapping is supposed to build a SELECT with INNER JOINs on children if they are correctly configured in the entity?
public class Project
{
[PrimaryKey]
public long Id { get; set; }
[ForeignKey(typeof(EnterpriseClient))]
public long EnterpriseClientId { get; set; }
[ManyToOne]
public EnterpriseClient EnterpriseClient { get; set; }
[OneToMany(CascadeOperations = CascadeOperation.All)]
public List<WorkOrderHead> WorkOrderHeads { get; set; }
}
If we get all the Projects with GetAllWithChildren:
var x = _db.GetAllWithChildren<Project>(p => true);
Our result is multiple select for each child (EnterpriseClient) and we were hoping that it would en in one select and a join to collect all the data at once.
Is our configuration wrong or it's supposed to be that way?