instructor_ex icon indicating copy to clipboard operation
instructor_ex copied to clipboard

Is there a way for instructor to ignore some fields in the schema?

Open glappen opened this issue 9 months ago • 1 comments

Hello, I'm using instructor to generate content for my app, but my schemas are stored in a database and instructor is generating primary keys and foreign keys. For example, my Question schema has an id field, and instructor is generating a1b2c3d4e5 for this instead of letting a UUID be generated by ecto on insert. I tried this and it did not work:

  ## Field Descriptions:
  - id: database primary key. leave this empty.
  ...

Any suggestions?

Thank you!

glappen avatar Mar 05 '25 20:03 glappen

Yes that would be nice. Right now I have just defined a copy of the target schema as an embedded schema, with that keys missing, and after I convert the embedded to the actual schema

ponychicken avatar Mar 11 '25 10:03 ponychicken