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

@OneToMany definition getXXXModels Cannot find setter #1735

Open
mofreeLife opened this issue Sep 15, 2022 · 0 comments
Open

@OneToMany definition getXXXModels Cannot find setter #1735

mofreeLife opened this issue Sep 15, 2022 · 0 comments

Comments

@mofreeLife
Copy link

mofreeLife commented Sep 15, 2022

ISSUE_TEMPLATE

DBFlow Version: 5.0.0-alpha2

Bug or Feature Request: Bug

Description:
@get:OneToMany(oneToManyMethods = [OneToManyMethod.LOAD])
val schemeDataModels: List? by oneToMany {
select from SchemeDataModel::class where SchemeDataModel_Table.schemeModel_id.eq(id)
}

error: class com.dbflow5.processor.definition.OneToManyDefinition : @onetomany definition getSchemeDataModels Cannot find setter setSchemeDataModels for variable schemeDataModels.

`
@table(database = AppDatabase::class)
data class SchemeModel(
@PrimaryKey(autoincrement = true)
var id: Long = 0,
@column
var schemeName: String = "",

) : BaseModel() {

@get:OneToMany(oneToManyMethods = [OneToManyMethod.LOAD])
val schemeDataModels: List<SchemeDataModel>? by oneToMany {
    select from SchemeDataModel::class where SchemeDataModel_Table.schemeModel_id.eq(id)
}

}
`

@Table(database = AppDatabase::class) data class SchemeDataModel( @PrimaryKey(autoincrement = true) var id: Long = 0, @ForeignKey(stubbedRelationship = true) var schemeModel: SchemeModel? = null, @Column var mimeType: String = "", @Column var data1: String = "", @Column var data2: String = "" ) : BaseModel()

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