p3
p3
PPrisma
Created by p3 on 4/17/2025 in #help-and-questions
Extremely strange behavior
I'm not sure what to call this. All addresses are stored in the address table. To distinguish mailing or physical addresses, their IDs are placed into the respective tables which are then reference by student. When a student has equivalent mailing and physical addresses, the function above in my NestJS application returns undefined for the address_physical within the Student object and I have no idea why. I suspect that because there are name similarities or the IDs to the mailing and physical addresses are the same causes Prisma to go haywire. The even weirder thing is that when I console.log the address_physical.address, it is very clearly defined (although the same as mailing_address, which is intended). I have checked my NestJS entity models and there are no issues there either.
11 replies