Fullstack TypeScript toolkit that enhances Prisma ORM with flexible Authorization layer for RBAC/ABAC/PBAC/ReBAC, offering auto-generated type-safe APIs and frontend hooks.
The returning data includes all the fields in the BaseOrder model (for Order) and for the lineItems (which are instances of OrderItem model), however the nested BillingAddress and ShippingAddress models only return the relationship ids that are set within these extended models, and non of the fields against OrderAddress
Any ideas on what I'm doing wrong or if this is an issue in Zenstack? - I'm using v2.4.1
Issue raised after @jiashengguo reviewed and confirmed this is a bug.
Environment (please complete the following information):
ZenStack version: 2.41
Prisma version: 5.7.0
Database type: Postgresql (Supabase)
Additional context
Example schema.zmodel file attached (rename/change file extension from .txt - had to change in order for upload to github)
schema.zmodel.txt
Description and expected behavior As per discord help post (thread id: 1271572119838261270)
I've have a base model called BaseOrder which I extend into Order and GuestOrder models.
Within BaseOrder I have a 1-1 relationship with BillingAddress and ShippingAddress models, which extend from an OrderAddress model.
I'm running the following update statement transaction (via an enhanced zenstack prisma instance as the transaction):
The returning data includes all the fields in the BaseOrder model (for Order) and for the lineItems (which are instances of OrderItem model), however the nested BillingAddress and ShippingAddress models only return the relationship ids that are set within these extended models, and non of the fields against OrderAddress
Any ideas on what I'm doing wrong or if this is an issue in Zenstack? - I'm using v2.4.1
Issue raised after @jiashengguo reviewed and confirmed this is a bug.
Environment (please complete the following information):
Additional context Example schema.zmodel file attached (rename/change file extension from .txt - had to change in order for upload to github) schema.zmodel.txt