79356431

Date: 2025-01-14 21:37:48
Score: 5.5
Natty:
Report link

I'm trying to implement a many-to-many relationship similar to what you've done, but I'm encountering a compile error with the schema.

Is it working on your end? If so, would you mind taking a look at my schema and seeing if you notice anything that might be causing the issue?

Thank you in advance for your help!

type User
  @table(name: "Users", singular: "user", plural: "users", key: ["id"]) {
  id: UUID! @col(name: "uid") @default(expr: "uuidV4()")
  username: String! @col(name: "username") @unique
  offices: [Office] 
}


type Office
  @table(name: "offices", singular: "office", plural: "offices", key: ["id"]) {
  id: UUID! @col(name: "office_id")
  name: String! @col(name: "name") @unique
  users: [User]
}

The error is:

On User.offices: Does not support array reference field. For one-to-many relation, define the singular reference field like Office.user: User!Firebase Data Connect: Compiler

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Blacklisted phrase (2): would you mind
  • RegEx Blacklisted phrase (3): Thank you in advance
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: 3ameration