When using Prisma's Fluent API with a read replica, the returned object does not adhere to the expected structure.
Repro: read-replicas-demo
Current Behavior:
Using the primary database, the following code:
await prisma.$primary().post.findFirst().author()
returns:
However, when using a read replica, this code:
await prisma.post.findFirst().author()
returns a nested object:
Expected Behavior
Using a read replica should also return: