MrHertal/react-admin-amplify-demo

Quick tip on auto-incrementing IDs

weisisheng opened this issue · 1 comments

Bit of a blind truffle pig with React-Admin and/or combined with Amplify, I was having a blocking problem with Amplify not autogenerating "ID"s for me (used as the primary key).

I was mistakenly including the ID field in my createFoo form but disabling it, thinking I will hide it later during the creation of a production app and once I got the auto-increment problem fixed. Initially, I thought I would have to dig into one of the VTL resolvers but, on a whim, I just removed the ID from the form, and bingo(!), auto-incrementing IDs.

Hope this saves someone else time. Cheers.

Closed as just a tip for others