Chip Clark
08/09/2021, 8:24 PMLicense: {
some: {
AND: [
{
LicenseTypeID: 2
},
{
LicenseTypeID: 3
}
]
}
There are records that meet the criteria, but this returns nothing.
Any suggestions how to get the "some" to work with the AND?Ryan
08/10/2021, 5:56 AMsome
inside AND
:
AND: [
{ some: { LicenseTypeID: 2 } },
{ some: { LicenseTypeID: 3 } },
]
Chip Clark
08/10/2021, 3:37 PMChip Clark
08/10/2021, 3:50 PMAND
in where.AND.3.License.AND for type LicenseListRelationFilter. Available args:
type LicenseListRelationFilter {
every?: LicenseWhereInput
some?: LicenseWhereInput
none?: LicenseWhereInput
}Chip Clark
08/10/2021, 3:52 PMwhereClause = { // BEGINNING OF WHERE
OR: [
{
EmploymentStatus: "A"
},
{
EmploymentStatus: "L"
},
{
EmploymentStatus: "C"
},
], // WHERE EmploymentStatus = "A", "L", or "C"
AND: [ // AND include
{
OfficeLocation: {
OfficeLocationCode: office
}
},
{
HRDepartmentID: hrdept
},
{
LegalDepartmentID: legaldept
},
{
License: {
some: { LicenseTypeID: 2 }
}
},
{
License: {
some: { LicenseTypeID: 3 }
}
},
{
...(searchString
? {
OR: [
{
LastName: { contains: searchString },
},
{
FirstName: { contains: searchString },
},
{
MiddleName: { contains: searchString },
},
{
PreferredFirstName: { contains: searchString },
},
{
DisplayName: { contains: searchString },
},
],
}
: {}),
}
]
};
Therefore I had to include a some for each LicenseTypeID