Should allow multiple many to many
Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the FAQ.
- [X] I have searched for duplicate or closed issues.
- [X] I have read the guide for submitting bug reports.
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
App Id
No response
Region
No response
Amplify Console feature
No response
Describe the bug
type BodyArea
@model
@auth(
rules: [
{ allow: public, operations: [read] }
{ allow: groups, groups: ["admin"], operations: [read] }
{ allow: private }
]
) {
id: ID!
key: String!
name: String!
symptoms_common: [Symptom] @manyToMany(relationName: "BodyAreaSymptomCommon")
symptoms_all: [Symptom] @manyToMany(relationName: "BodyAreaSymptomAll")
body_parts: [BodyPart] @hasMany(indexName: "byBodyArea", fields: ["id"])
}
type BodyPart
@model
@auth(
rules: [
{ allow: public, operations: [read] }
{ allow: groups, groups: ["admin"], operations: [read] }
{ allow: private }
]
) {
id: ID!
key: String!
name: String!
symptoms_common: [Symptom] @manyToMany(relationName: "BodyPartSymptomCommon")
symptoms_all: [Symptom] @manyToMany(relationName: "BodyPartSymptomAll")
body_area_id: ID! @index(name: "byBodyArea", sortKeyFields: ["key"])
body_area: BodyArea @belongsTo(fields: ["body_area_id"])
}
type Symptom
@model
@auth(
rules: [
{ allow: public, operations: [read] }
{ allow: groups, groups: ["admin"], operations: [read] }
{ allow: private }
]
) {
id: ID!
key: String!
name: String!
dewey: String!
body_area_common: [BodyArea] @manyToMany(relationName: "BodyAreaSymptomCommon")
body_area_all: [BodyArea] @manyToMany(relationName: "BodyAreaSymptomAll")
body_part_common: [BodyPart] @manyToMany(relationName: "BodyPartSymptomCommon")
body_part_all: [BodyPart] @manyToMany(relationName: "BodyPartSymptomAll")
}
Expected behavior
Works when push backend accept connections on content page crash amplify studio so I tried deleting what I had and doing it through studio but it won't let me
Reproduction steps
use schema provided try and add data in content section and fails if try a m:m connection so try just using data section to create the autogenerated connections but doesnt work for more than one but i need a list of all symptoms and common so need both. Which works completely fine on everything. outside of amplify studio like appsync or from my front end
Build Settings
No response
Additional information
No response
Hi @24jr 👋🏽, thanks for raising this! Transferring to the Admin UI repo since this issue seems to be related to the Amplify Studio.
@hloriana oh yeah i was thinking thats what amplify console was. Idk how you transfer but this is for amplify studio also https://github.com/aws-amplify/amplify-console/issues/2461
This is presently a DataStore limitation with wide-ranging impact across all libraries and platforms, and so their isn't a quick hit solution at present, it's in our backlog to support this in the future, and until then this is disabled within Studio as well.