Skip to content

Empty embedded structs support #135

Description

@vheathen

Hi!

Thanks for the project, it is very useful.

I would kindly ask about a decision behind the empty maps handling.

Currently, on cast it sees an empty map as a nil value. But in my case it is possible to have embedded empty structs, because the name (module) of the struct is a value by itself.

I also use :use_parent_field_for_type parameter to get the structure type. Everything works until I try to read a record with an empty struct (and it is clear why: nothing is written to the DB if parameters map is empty) and if I add the __type__ field into a params map - I get ** (CondClauseError) no cond clause evaluated to a truthy value as per one the issues.

So, I'm trying to understand how to solve the problem other than adding fake data into the empty structures.

Thank you!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions