Hi had a new issue come up during seeding that was...
# orm-help
j
Hi had a new issue come up during seeding that was working before an upgrade, but cant tell why it wont work, It seems like Prisma is giving me a paradox of answers. If I try to create with owner it wants ownerId if I try ownerId it wants owner.
Copy code
const account = await prisma.account.create({
         data: {
           name: 'Company 1',
           owner: {
             connectOrCreate: {
               where: {
                 email: '<mailto:me@me.com|me@me.com>'
               },
               create: {
                 firstName: 'Carl',
                 lastName: 'Stete',
                 email: '<mailto:me@me.com|me@me.com>',
                 password: 'password',
                 meta: '{"admin":true}',
                 isSuperAdmin: 1
               }
             }
           },
           meta: '{"settings":{}}'
         },
         include: {
           owner: true
         }
       });
the above is what I am running, any suggestions?
from prisma schema
a
it looks like the types are changing in the two screencaps above
AccountCreateInput is going to want the syntax of
Copy code
owner: {
  connect: {
    id: ownerId
  }
}
whereas, I think, AccountUncheckedCreateInput may be the opposite
j
thanks for the help @Austin Zentz!
👍 1