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