module Avram::NestedSaveOperation

Overview

Avram's implementation errors in an update operation:

duplicate key value violates unique constraint "<constraint name>" (PQ::PQError)

{{ type }}.new(params) causes {{ name }}.save to create (rather than update) a record each time it is called, since no record was passed when the nested operation was instantiated.

Ref: https://github.com/luckyframework/avram/blob/master/src/avram/nested_save_operation.cr

Defined in:

charms.cr

Constant Summary

NESTED_SAVE_OPERATIONS = [] of Avram::MarkAsFailed

Macro Summary

Macro Detail

macro has_one_create(type_declaration, *, assoc_name) #

[View source]
macro has_one_update(type_declaration, *, assoc_name) #

[View source]