Issue Description
After adding the ash_paper_trail extension to our resources, operations that use managed relationships :direct_control are failing.
Error Details
When attempting operations that create/update associated resources via managed relationships, we encounter
the following error:
%Ash.Error.Unknown{
bread_crumbs: ["Error returned from: Order.create"],
changeset: "#Changeset<>",
errors: [%Ash.Error.Unknown.UnknownError{
error: "** (ArgumentError) unknown field `:paper_trail_versions` in schema Address
given to insert_all. Unwritable fields, such as virtual and read only fields are not supported.
Associations are also not supported",
field: nil,
value: nil,
splode: Ash.Error,
bread_crumbs: ["Error returned from: Order.create"],
vars: [],
path: [:address, 0],
stacktrace: #Splode.Stacktrace<>,
class: :unknown
}]
}
When It Occurs
- During operations using direct_control managed relationships
- When creating resources that have nested resources managed via relationships
- Specifically with operations that might trigger bulk database operations
Steps to Reproduce
- Add the AshPaperTrail.Resource extension to resources
- Configure appropriate domain extensions and version table resources
- Perform operations that use direct_control relationships to create/update nested resources
Environment Details
- ash_paper_trail version: 0.5.3
- Ash version: 3.5.5
Notes
- The error specifically mentions the :paper_trail_versions virtual field during insert_all operations
- Standard create/update operations work fine
- Only fails with operations that trigger bulk processing of managed relationships
- Other resources without :direct_control seem to work fine
Issue Description
After adding the ash_paper_trail extension to our resources, operations that use managed relationships :direct_control are failing.
Error Details
When attempting operations that create/update associated resources via managed relationships, we encounter
the following error:
When It Occurs
Steps to Reproduce
Environment Details
Notes