Skip to content

Use Left Join if relation columnId is optional #24

@cblanquera

Description

@cblanquera

I havent thoroughly tested what happens when a relational column is nullable like the following.

model Profile { 
  addressId String?  @label("Address")
  address Address @relation({ local “addressId” foreign “id” })  
} 

It should have a result set similar to below.

{
  "addressId": null
  "address": null
}

Oppositely for related columns (reverse) we should make sure the following is also considered.

model Address {
  profile Profile? @label("Profile")
}

It should have a result set similar to below.

{
  profile: null
}

Metadata

Metadata

Assignees

Labels

choreCheck on something or indirect work.

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions