Skip to content

Bad error message for invalid field on update.set #24

@WebFreak001

Description

@WebFreak001

example:

../../.dub/packages/dorm-0.3.1/dorm/source/dorm/declarative/conversion.d(119,53): Error: array index 18446744073709551615 is out of bounds `[Field("id", "id", "long", DBType.int64, [DBAnnotation(SumType(Storage(AnnotationFlag.primaryKey, , , , , , , , , , , , , , , , , , , , , ), cast(ubyte)0u)), DBAnnotation(SumType(Storage(AnnotationFlag.autoIncrement, , , , , , , , , , , , , , , , , , , , , ), cast(ubyte)0u))], null, SourceLocation("source/models.d", 64, 11)), Field("hidden", "hidden", "bool", DBType.boolean, [DBAnnotation(SumType(Storage(AnnotationFlag.notNull, , , , , , , , , , , , , , , , , , , , , ), cast(ubyte)0u)), DBAnnotation(SumType(Storage(, , , , , , , , , , , , , , DefaultValue(false), , , , , , , ), cast(ubyte)14u))], null, SourceLocation("source/models.d", 76, 7)), Field("author", "fields.author", "ModelRefImpl!(id, User, User)", DBType.int64, [DBAnnotation(SumType(Storage(AnnotationFlag.notNull, , , , , , , , , , , , , , , , , , , , , ), cast(ubyte)0u)), DBAnnotation(SumType(Storage(, , , , , , , , , , , , , , , , , , , , , ForeignKeyImpl("user", "id", ReferentialAction.restrict, ReferentialAction.restrict)), cast(ubyte)21u))], null, SourceLocation("source/models.d", 68, 17)), Field("score", "fields.score", "long", DBType.int64, [DBAnnotation(SumType(Storage(AnnotationFlag.notNull, , , , , , , , , , , , , , , , , , , , , ), cast(ubyte)0u))], null, SourceLocation("source/models.d", 69, 8)), Field("created_at", "fields.createdAt", "SysTime", DBType.datetime, [DBAnnotation(SumType(Storage(AnnotationFlag.notNull, , , , , , , , , , , , , , , , , , , , , ), cast(ubyte)0u))], null, SourceLocation("source/models.d", 70, 11)), Field("updated_at", "fields.updatedAt", "SysTime", DBType.datetime, [DBAnnotation(SumType(Storage(AnnotationFlag.notNull, , , , , , , , , , , , , , , , , , , , , ), cast(ubyte)0u))], null, SourceLocation("source/models.d", 71, 11)), Field("closed", "fields.closed", "bool", DBType.boolean, [DBAnnotation(SumType(Storage(AnnotationFlag.notNull, , , , , , , , , , , , , , , , , , , , , ), cast(ubyte)0u))], null, SourceLocation("source/models.d", 72, 8))][0 .. 7]`
../../.dub/packages/dorm-0.3.1/dorm/source/dorm/api/db.d(1800,18): Error: template instance `dorm.declarative.conversion.DormField!(HighScore, "score")` error instantiating
source/app.d(223,4):        instantiated from here: `set!"score"`

Tried to set a field of an @embedded struct inside the model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions