Skip to content

Documentation: Enums embedded in Class #103

@chrisrohrer

Description

@chrisrohrer

Suggestion to clarify documentation:

Please note:
When using Enums defined inside a Class they have to be specified on the property including the Class name

class EnumEntity: Entity {

    enum TestEnum: Int {
        case unknown = 0
        case first = 100
        case second = 200
        case third = 300
    }

    var id: Id = 0
    // objectbox: convert = { "default": ".unknown" }
    var custom: EnumEntity.TestEnum
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions