Skip to content
New issue

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

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

Open
WebFreak001 opened this issue Dec 19, 2022 · 0 comments
Open

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

WebFreak001 opened this issue Dec 19, 2022 · 0 comments

Comments

@WebFreak001
Copy link
Member

WebFreak001 commented Dec 19, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant