Open
Description
Description:
This issue was previously resolved #366. But with the current implementation of the DM, it seems to have broken again.
Code:
type Person record {
string id;
string firstName;
string lastName;
int age;
string country;
Contact[] registry;
};
type Course record {
string id;
string name;
int credits;
};
type Student record {
string id;
string fullName;
string age;
record {
string title;
int credits;
}[] courses;
int totalCredits;
string visaType;
string contactPhone;
};
type Contact record {
string mediumType;
string phoneNumber;
};
const D_TIER_4_VISA = "D-tier-4";
var totalCredits = function(int total, record {string id; string name; int credits;} course) returns int => total + (course.id.startsWith("CS") ? course.credits : 0);
function transform(Person person) returns Student => {
contactPhone: (from var contact in person.registry
where contact.mediumType == "TELEPHONE"
select contact.phoneNumber)[0]
}
Steps to reproduce:
Affected Versions:
OS, DB, other environment details and versions:
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
Metadata
Metadata
Assignees
Type
Projects
Status
📋 Backlog