How do I do a join that would return me results similar to-
SELECT * FROM Project LEFT JOIN ProjectRegion ON ProjectRegion.id = Project.projectRegion
I currently use the syntax-
Project[] projects = Project.FindAll();
My tables are setup with ActiveRecord/hibernate as follows -
[ActiveRecord]
public class ProjectRegion : ActiveRecordBase<ProjectRegion>
{
private int id;
private String title;
public ProjectRegion()
{
}
[PrimaryKey]
public int Id
{
get { return id; }
set { id = value; }
}
[Property]
public String Title
{
get { return title; }
set { title = value; }
}
}
[ActiveRecord]
public class Project : ActiveRecordBase<Project>
{
private int id;
private String projectNumber;
private String projectRegion;
public Project()
{
}
[PrimaryKey]
public int Id
{
get { return id; }
set { id = value; }
}
[Property]
public String ProjectInternalCode
{
get { return projectNumber; }
set { projectNumber = value; }
}
[Property]
public String ProjectRegion
{
get { return projectRegion; }
set { projectRegion = value; }
}
...