We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't use enums as dictionary keys.
Example:
enum MyEnum: String, Codable { case one } final class MyModel: Model { static var schema: String = "tests" @ID(key: .id) var id: UUID? @Field(key: "test") var test: [MyEnum : Float] } struct CreateMigration: Migration { func prepare(on database: Database) -> EventLoopFuture<Void> { return database.schema(MyModel.schema) .id() .field("test", .dictionary(of: .float), .required) .create() } func revert(on database: Database) -> EventLoopFuture<Void> { return database.schema(MyModel.schema).delete() } } let test = MyModel() test.test = [.one: Float(1)] test.save(on: app.db)
Steps to reproduce the behavior:
Create database schema correctly
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
I can't use enums as dictionary keys.
To Reproduce
Example:
Steps to reproduce the behavior:
Expected behavior
Create database schema correctly
Environment
The text was updated successfully, but these errors were encountered: