Hi,
I am trying to do a self-referenced class where the class is referencing itself. Following is what I have done.
parent is the self reference to do the parent child. It works but I am having problem when I am trying to find all the child for a class.
string query = "SELECT * FROM RequirementExtent d where d.parent = " + br.Dbid ;
IQueryResult result = scope.GetOqlQuery(query).Execute();
or
var tmp = from b in scope.Extent<Requirement>() where b.Parent == lookingfor select b;
both are not working.
what is the best way to get all the child for a object.
public partial class Requirement
{
public int requirementDbid = -1;
public Requirement parent = null;
public String name = null;
public String description = null;
public DateTime createdOn;
public User createdBy = null;
public DateTime? modifiedOn;
public User modifiedBy = null;
}