Ent API: loadBy*() Unique Key
Last updated
const [user1, user2] = await Promise.all([
EntUser.loadByX(vc, { email: "test1@example.com" }),
EntUser.loadByX(vc, { email: "test2@example.com" }),
]);SELECT * FROM table WHERE email IN('test1@example.com', 'test2@example.com');const topics = await Promise.all([
EntTopic.loadByX(vc, { creator_id: "123", slug: "abc" }),
EntTopic.loadByX(vc, { creator_id: "123", slug: "def" }),
EntTopic.loadByX(vc, { creator_id: "456", slug: "ghi" }),
EntTopic.loadByX(vc, { creator_id: "456", slug: "jkl" }),
]);SELECT * FROM table WHERE
(creator_id='123' AND slug IN('abc', 'def')) OR
(creator_id='456' AND slug IN('ghi', 'jkl'));