Skip to content

Creating originator config for each schema #240

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

Open
hgezim opened this issue Feb 24, 2025 · 0 comments
Open

Creating originator config for each schema #240

hgezim opened this issue Feb 24, 2025 · 0 comments

Comments

@hgezim
Copy link

hgezim commented Feb 24, 2025

Hey, thanks for this library.

Perhaps I've not understood how to properly use it but I'm wonder if there isn't a way to set it up to use a schema field value as originator by default.

For example in this schema:

 schema "integrations" do
    field(:status, :string)
    field(:max_concurrent_jobs, :integer, default: 12)
    field(:current_job_count, :integer, default: 0)
    field(:rules, :map)
    field(:secret_id, :string)
    field(:type, :string, default: "MJ")

    belongs_to(:user, User, type: :binary_id, foreign_key: :owner)
end

I know that :user or (:owner) field has the information for originator.

Instead of having to specify an originator each time I save, update or delete, I could just set this up once.

Hope that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant