You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Workflow
include Dynamoid::Document
include SecureRandom
table name: :workflows, key: :company_id
range :api_name
has_many :workflow_logs
field :company_id, :integer
field :api_name
field :workflow_id, :string, default: SecureRandom.uuid
}
class WorkflowLog
include Dynamoid::Document
table name: :workflow_logs
belongs_to :workflow, foreign_key: :workflow_id
field :company_id, :integer
end
Workflow has primary partition key as company id and sort key api name, i want workflow_id to be foreign key for workflow logs, but its taking company_id value for workflow logs
The text was updated successfully, but these errors were encountered:
The only thing I remember is that associations don't work now when primary key is compound - when there is a range/sort key. So WorkflowLog cannot belong to a model with range/sort key.
Workflow has primary partition key as company id and sort key api name, i want workflow_id to be foreign key for workflow logs, but its taking company_id value for workflow logs
The text was updated successfully, but these errors were encountered: