Hi,
i have the following piece of code:
IRelationCollection relations = new RelationCollection
{
StudentFinalGradeByClassEntity.Relations.EnrollmentEntityUsingStudentIdClassIdSemesterIdAcademicTermId,
EnrollmentEntity.Relations.AcademicTermEntityUsingAcademicTermId,
AcademicTermEntity.Relations.AcademicYearEntityUsingAcademicYearId,
EnrollmentEntity.Relations.ClassAcademicSemesterEntityUsingClassIdSemesterId,
ClassAcademicSemesterEntity.Relations.ClassEntityUsingClassId,
ClassEntity.Relations.CourseEntityUsingCourseId
};
IEntityRelation relation1 = new EntityRelation(StudentFinalGradeByClassFields.StudentId, StudentHistoryFields.StudentId, RelationType.ManyToMany);
IEntityRelation relation2 = new EntityRelation(StudentFinalGradeByClassFields.AcademicTermId, StudentHistoryFields.AcademicTermId, RelationType.ManyToMany);
relations.Add(relation1);
relations.Add(relation2);
and somehow only relation1 is added in relations.
if i change the order as
relations.Add(relation2);
relations.Add(relation1);
then only relation2 is added into the collection.
Somehow second add is always omitted. (checked it through generated sql).
Am i doing something wrong here?
thanks
-shane