-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple one2one/one2many/many2many relationships will not compile SWIFT #3946
Comments
Thanks for filing the issue @bargeboss-chris. Could you please provide the plain-text version the schema that causes the issue? That will help us reproduce and diagnose the issue. |
Hi @mattcreaser Here is the file import { type ClientSchema, a, defineData } from '@aws-amplify/backend'; const schema = a.schema({ customer: a.model({ usr: a.model({ grp: a.model({ grpUsr: a.model({ resource: a.model({ grpResource: a.model({ trackerHardware: a.model({ trackerHardwareAssignmentHistory: a.model({ trackerHardwareService: a.model({ trackerHardwareServiceParts: a.model({ simCard: a.model({ simCardAssignmentHistory: a.model({ resourceLocationHistory: a.model({ resourceGeoFenceAlarmHistory: a.model({ resourceGeoFenceActivationHistory: a.model({ resourceHardHitAlarmHistory: a.model({ resourceLowBatteryAlarmHistory: a.model({ }); export type Schema = ClientSchema; export const data = defineData({ /== STEP 1 =============================================================== /*== STEP 2 =============================================================== Using JavaScript or Next.js React Server Components, Middleware, Server /* const client = generateClient() // use this Data client for CRUDL requests /== STEP 3 =============================================================== /* For example, in a React component, you can use this snippet in your // return
|
here is the sample file I was using for testing. the one above is for our production application import { type ClientSchema, a, defineData } from '@aws-amplify/backend'; /== STEP 1 ===============================================================
}); export type Schema = ClientSchema; export const data = defineData({ /*== STEP 2 =============================================================== Using JavaScript or Next.js React Server Components, Middleware, Server /* const client = generateClient() // use this Data client for CRUDL requests /== STEP 3 =============================================================== /* For example, in a React component, you can use this snippet in your // return
|
@mattcreaser : Any updates on this issue? |
Describe the bug
If you have a singular o2o/o2m/m2m relationship in a table the swift generated files by amplify will compile and run correctly. If there are multiple o2o/o2m/m2m relationships in a table that reference multiple different tables, the files generated will not compile.
Steps To Reproduce
Expected behavior
compile correctly.
Amplify Framework Version
6.12.0
Amplify Categories
DataStore
Dependency manager
Swift PM
Swift version
5
CLI version
1.4.6
Xcode version
16.2
Relevant log output
Is this a regression?
No
Regression additional context
No response
Platforms
iOS
OS Version
iOS 18.2
Device
iPhone 16 pro
Specific to simulators
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: