Skip to content

JSON instances require an extraneous id field for entities with a Primary #1035

@parsonsmatt

Description

@parsonsmatt

For a model definition:

share [mkPersist sqlSettings] [persistLowerCase|
JsonEncoding json
    name Text
    age  Int
    Primary name
    deriving Show Eq
|]

This will generate an instance {To,From}JSON (Entity JsonEncoding) that requires an "id" field in the resulting object.

Serializing always puts a blank string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions