I have two tables: web_conference is a one to many with the second child table conference_users.
I am attempting to use strapi.entityService to create a new entry to the web_conference and conference_users table like so:
const mapInvites = async ()=>{
return inviteList.conferenceUsers.map(async (item)=>{
let result = {
userId:item.userId,
sessionId:item.sessionId
}
return result
})
}
try {
const newParentObject = await strapi.entityService.create('api::web-conference.web-conference',{
populate:true,
data:{
ownerId:userUid,
sessionId:sessionId,
title:title,
date:date,
startTime:startTime,
endTime:endTime,
publishedAt: publishedAt,
conference_users:await Promise.all(await mapInvites()),
inviteRequired:inviteOnly}
});
}
catch (error) {
console.log(error)
}
However,I keep getting the error
message:'Undefined attribute level operator conference_users'
name: 'ValidationError'
I have no idea how to solve this and have been stuck for quite some time.
I simply want to be able to populate these tworelational tables. Can someone offer assistance?