Skip to content

Documentation: Enums embedded in Class #103

Open

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
}

Activity

  1. changed the title [-]Enums embedded in Class[/-] [+]Documentation: Enums embedded in Class[/+] on Jul 12, 2025
  2. added
    documentationImprovements or additions to documentation
    and removed
    bugSomething isn't working
    on Jul 14, 2025
  3. greenrobot-team commented on Jul 14, 2025

    @greenrobot-team
    Member

    Thanks for reporting! I'll verify this when there is time.

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

    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